On Sun, Jan 13, 2013 at 12:35 PM, Kuzeko Web Design - Matteo
Lissandrini <[email protected]> wrote:
> Hi all,
> I would like to work on my new project building Responsive layouts making
> use of flexible em-based media queries instead of pixel based.
> Did you tried this approach, is there anything I should pay attention to?
> Kuzeko*
Although I use a different approach, there is nothing wrong with using
em. And as with most any discipline there are many ways to achieve the
goal.
There are a couple of things to keep in mind, among them:
1/ You need a device width meta tag in the head of the document. I
used <meta name="viewport" content="width=device-width">
2/ If you use em then you may want to declare default font-size in
percent on html and use em font-size on selectors
3/ Shoot for the ability to view the site at twice default font-size
[200%] at any device screen width [including on a mobile-device]
/without/ throwing a horizontal scroll bar.
4/ The media query may be px or em-based. I am used @media screen and
(min-width:30em) {#page{width:90%;min-width:90%;max-width:90%}}
Please see source of this simple fast and dirty test page
<http://ccstudi.com/site/playpen/layouts/test_37.html>
Best,
David Laakso
______________________________________________________________________
css-discuss [[email protected]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/