I want to apply different CSS styles depending on whether the orientation of the device is vertical (portrait mode ) or horizontal (landscape mode ) . Can it be achieved with just CSS?
Is there an alternative? I suppose you could always detect the width and height of the window with JavaScript and from there decide which styles to apply, but I wonder if there is an easier way that uses only CSS (if not, a JS solution would be nice).