Streaming live at 10am (PST)

How to have different style for mobile


#1

Hey guys,

I was wondering how I could have an element look and behave differently on mobile? I click the mobile view from the panel and I create a new class for mobile view but then from desktop view I delete the mobile class? I know my logic is wrong here, but can't think of any other way of doing it. Thanks!


#2

Hi, you do not need to create new classes to achieve different looks on mobile.

Style your element with a named class on Desktop view. Then switch to mobile view, and style that same class and element the way it need to be styled in the mobile view (or for that matter, any of the views that you want to check styling for that class). If you override the styling of a class at a certain viewport size, those changes will then cascade down to the next lower view and so one all the way to mobile view.

Does that help?

Cheers, Dave


#3

Hey Dave,

Thank you that helped alot!


#4