469,275 Members | 1,603 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,275 developers. It's quick & easy.

Box model

So, there are two box models around: the W3C's standard one and the one
used, for example, by IE4. And it becomes an issue when you want to specify
the width or height of an element which has padding and margins != 0. Now I
know that I can hide parts of my CSS from certain browsers, for example:

a { width: 100px; } /* value for IE */
body>a { width: 90px;} /* value for standard box model */

where IE cannot read "body>a" and thus keeps the value of 100px, while other
browsers overwrite it with the value of 90px. And I know I can use (misuse?)
doctypes to force certain browsers into standards or quirks mode... But I
cannot rely upon "quirks browsers" to ignore my "body>a", so there might
actually be a browser which is not capable of rendering in standards mode
but *will* read the second line in the above example. Thus, this is not a
fool proof way of serving each browser the appropriate value for width. Or
is it? I know of other ways to hide CSS from browsers, but I wonder if there
is *the* perfect solution for dealing with this particular problem. Is there
a way I can make sure that every standards compliant browser of the past,
present and future will get the proper value while at the same time all
quirky browsers will get their "quirky" value?


Jul 20 '05 #1
1 1470
Thomas Mlynarczyk wrote:
I know of other ways to hide CSS from browsers, but I wonder if there
is *the* perfect solution for dealing with this particular problem. Is there
a way I can make sure that every standards compliant browser of the past,
nope
present
yes, if we count IE6 to be a standards compliant browser from the past
and future
nope
will get the proper value while at the same time all
quirky browsers will get their "quirky" value?

--
Anne van Kesteren
<http://www.annevankesteren.nl/>
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Flare | last post: by
7 posts views Thread by pysim | last post: by
10 posts views Thread by Michael Strorm | last post: by
4 posts views Thread by Davݭ ١risson | last post: by
6 posts views Thread by Robert W. | last post: by
122 posts views Thread by Edward Diener No Spam | last post: by
23 posts views Thread by tonytech08 | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.