![]() |
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 |
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 |
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 |
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.