Reputation: 47
something like:
if orientation = landscape { hide divA else show divA}
excuse non script example, thought it would be easier to explain that way as not too sure the best way to go about it
Upvotes: 2
Views: 1589
Reputation: 7026
Yes you can do this with css media queries.
jsfiddle demo (Make the width of the html view smaller and see what happens)
@media all and (orientation:portrait) {
/* Styles for Portrait screen */
}
@media all and (orientation:landscape) {
/* Styles for Landscape screen */
}
Upvotes: 3