Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   HTML (http://www.velocityreviews.com/forums/f31-html.html)
-   -   widths in Netscape/Mozilla (http://www.velocityreviews.com/forums/t157083-widths-in-netscape-mozilla.html)

James Yu 02-11-2004 01:48 AM

widths in Netscape/Mozilla
 
When I specify a width in css for a box, Netscape renders the box with a
width of "width + padding". I want Netscape to just consider the absolute
width of the box, and not take padding into account at all. Are there any
work arounds? This is inconsistent with IE. Or am I missing something?

Thanks,
James



Mark Parnell 02-11-2004 01:59 AM

Re: widths in Netscape/Mozilla
 
On Tue, 10 Feb 2004 20:48:01 -0500, "James Yu" <jjy7@cornell.edu>
declared in alt.html:

> When I specify a width in css for a box, Netscape renders the box with a
> width of "width + padding".


No it doesn't. URL?

--
Mark Parnell
http://www.clarkecomputers.com.au

Toby A Inkster 02-11-2004 07:31 AM

Re: widths in Netscape/Mozilla
 
James Yu wrote:

> When I specify a width in css for a box, Netscape renders the box with a
> width of "width + padding". I want Netscape to just consider the absolute
> width of the box, and not take padding into account at all. Are there any
> work arounds? This is inconsistent with IE. Or am I missing something?


Netscape does it the right way. Most other browsers do too. The width of
a rendered element should be:

'border-left' + 'padding-left' + 'width' + 'padding-right' + 'border-right'

And the amount of space that it takes up should be:

'margin-left' + 'Rendered Width (as above)' + 'margin-right'

Netscape, Opera, Konqueror, Safari all get this right. IE5 gets this
wrong. IE6 can be told to get it right though. How? By setting a DOCTYPE.
How? As the first line of your HTML, include this:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

--
Toby A Inkster BSc (Hons) ARCS
Contact Me - http://www.goddamn.co.uk/tobyink/?page=132


Mark Parnell 02-13-2004 12:04 AM

Re: widths in Netscape/Mozilla
 
On Wed, 11 Feb 2004 12:59:26 +1100, Mark Parnell
<webmaster@clarkecomputers.com.au> declared in alt.html:
>
> No it doesn't. URL?


Duh. Blonde moment. See Toby's post.

--
Mark Parnell
http://www.clarkecomputers.com.au


All times are GMT. The time now is 12:29 AM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57