Forum Moderators: open

Message Too Old, No Replies

Mobile responsive pages and defined content

         

toplisek

12:14 pm on Mar 6, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



As responsive design leads to the same content (not design) I like to know if there is possibility to show only two columns on mobile devices but other will be one column. Is this possible to do with Javascript?

Examples are Icon fonts. If you show them on mobile size it should be 2 column but other sizes should be 3 columns. Is this technical possible?

ronin

1:32 pm on Mar 6, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Yes, there are several ways to go about this.

One simple way (just using CSS - no javascript required) would be to

float:left;


the columns.

You can then use media queries to give the columns, respectively a

width:49%;
(for mobile)

or

width:33%
(for non-mobile).

toplisek

12:23 pm on Mar 8, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I have done this. There can be better control if I have defined variables when user came at website.