Possible to have styles for iPhone portrait vs. landscape?

Events happening in the community are now at Drupal community events on www.drupal.org.
arnemaine's picture

I'm wondering if it is possible to add a media query (or use some other technique, such as through a stylesheet) that would allow me to define different layouts for portrait vs. landscape on an iPhone or Android-based phone.

Just an idea that might be sweet, just like how portrait and landscape on a tablet displays differently. It would give complete control.

I primarily want to be able to re-orient a navigation list from a stack (in portrait) to a horizontal display (in landscape) but I can see other uses.

Is it possible to perhaps redefine the media query settings for one or two of the layouts in the grid settings?

Any suggestions?

Comments

Yes

rachel_norfolk's picture

Yes, there is an 'orientation' media query that works on webkit browsers. Should do the trick...

Sorry, on iPhone now so giving example is a bit much on this keyboard!!

Rachel

You could technically create

cellar door's picture

You could technically create a new media query and add the orientation for it, there's nothing against doing that.

I just think that the two are so close to each other (160px difference) and with being on that small of a device you really don't get a whole lot out of the extra width (I wouldn't want to add a sidebar or anything).

So the answer is sure, you can create a new orientation (or edit the existing) to have the orientation in the media query (and or widths) but the question is what's gained from that on such a small screen?

Omega Framework

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: