% or em in Flexible Layout?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

 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!


http://people.aapt.net.au/~adjlstrong /

Re: % or em in Flexible Layout?

Andrew wrote:
Quoted text here. Click to load it

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

Re: % or em in Flexible Layout?


Quoted text here. Click to load it



Then try:


Hehehe <evil grin>.

Infinity has its limits.

Site Timeline