Welcome to WebmasterWorld Guest from 107.20.54.98

Forum Moderators: not2easy

Message Too Old, No Replies

IE, 1px box height problem

     
6:15 pm on Feb 5, 2003 (gmt 0)

New User

10+ Year Member

joined:Dec 20, 2002
posts:15
votes: 0


Hello,

I am trying to set the height property of a simple CSS box model object and am running into a problem. The smallest box height I can get to render in IE is 8px! I checked the same page in Gecko and it renders the box with the proper height of 1px. Is this a known IE6 bug? Here is the test page:

[code]
<html>
<head>
<title>Test</title>
</head>
<body>

<div id="quickLinks0" style="display:block; position:absolute; background:red;
width:100%; height:1px; top:104px; margin:0px; padding:0px; border: 0px;"></div>

</body>
</html>

Thanks Everyone,
Derek Basch

6:45 pm on Feb 5, 2003 (gmt 0)

Full Member

10+ Year Member

joined:Oct 9, 2002
posts:245
votes: 0


Seems only to occur if your div is the lone element on the page.
7:08 pm on Feb 5, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member nick_w is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Feb 4, 2002
posts:5044
votes: 0


Not sure on the causes but, if you want a thin red line, why not try using a border on an element or even <gasp> an <hr> tag! ;)

Nick

9:12 pm on Feb 5, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member suzyuk is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Oct 1, 2002
posts:5199
votes: 0


Add:

font-size: 1px;

to override the default font size it's this that's causing the div to be 8-10px high..

Suzy

9:17 pm on Feb 5, 2003 (gmt 0)

New User

10+ Year Member

joined:Dec 20, 2002
posts:15
votes: 0


Thanks Suzy! I thought it may have been something to do with font size.

Derek