Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- % or em in Flexible Layout?
June 28, 2006, 10:47 am
rate this thread
I would be grateful for an answer to a question about flexible layout
for the following site:
The main content had margins set as:
margin: 0em 4% 0em 12.5em;
in my belief that this would give a flexible right border to the main
content. The W3C Validator spat the dummy at this as it mixed fixed
and relative values, a warning rather than failing the CSS ('this is
not a robust stylesheet'). So I altered the CSS to the current:
margin: 0em /*4%*/ 2em 0em 12.5em;
and the effect of flexibile design at all screen resolutions remains +
W3C validator is happier.Is it actually the body margin rules that
maintain this flexible design rather than my ignorant use of the %??
Thanks for anybody who can clear this up for me!
Re: % or em in Flexible Layout?
The W3C CSS validator isn't particularly impressive.
In general, pretty much all of its warnings may be safely ignored,
provided you "know what you're doing" and you've chosen that code
deliberately. It assumes a very dumb level of understanding by the