Media queries will “detect” the screen size for you. Knowing whether or not it’s a “mobile” device? See my post above. As for forcing the device into landscape mode from a browser, I hope that is not possible (I am not aware of an API for that). Finally, use media queries to adapt the layout to the screen.