CSS and small HD screens

  You are currently not logged in. You can view the forums, but cannot post messages. Log In | Register

19-Jan-13 06:32
I have been using the Elated 'Photoshoot' template for quite some time now. Although I have just a moderate knowledge of building websites, I managed to edit the CSS in such a way that the boxes on the right move to the bottom automatically when the viewport gets smaller dan (about) 700 pixels width.

I figured that this would also happen when you see the website on a mobile device, thus making the mainbox relatively bigger and the text easier to read. But it doesn't.

At first I didn't understand this and I tried several min-width and min-device-width code but then I realized this approach would never work as the screen resolution of a modern mobile is the same as that of a large HD screen: 1,280 x 720 pixels.

So, what I would like to know: is there another way for website code to distinguish small from large screens, even if they have the same resolution?

My website: http://www.digitaalfotograferen.net

[Edited by AndrewV on 21-Jan-13 06:37]

--
http://www.andrewvalkenburg.nl
22-Jan-13 12:04
Media queries.

http://www.w3.org/TR/css3-mediaqueries/

http://www.css3.info/preview/media-queries/

http://www.css3.info/preview/media-queries/

--
Chris.
So long, and thanks for all the fish.
http://webmaster-talk.eu/
28-Jan-13 07:33
Thanks for the tip, Chris. Unfortunately the 'handheld' attribute doesn't seem to work with modern HD mobile screens. But I managed to do something useful with the 'orientation' attribute. I made a separate stylesheet for 'portrait' oriented screens and that appears to works very nicely.

Andrew

--
http://www.andrewvalkenburg.nl
10-Feb-13 21:30
@AndrewV: You need to set the viewport meta tag to reduce the browser viewport to the device screen width. See "Dealing with mobile devices: the viewport meta tag" in my article for details:

http://www.elated.com/articles/responsive-web-design-demystified/

--
Matt Doyle, Elated
3rd Edition of my jQuery Mobile book out now! Learn to build mobile web apps. Free sample chapter: http://store.elated.com/

 
New posts
Old posts

Follow Elated