Welcome to WebmasterWorld Guest from 54.162.155.183

Forum Moderators: not2easy

Message Too Old, No Replies

IE, 1px box height problem

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

10+ Year Member



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)

10+ Year Member



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

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



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)

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



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)

10+ Year Member



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

Derek

 

Featured Threads

Hot Threads This Week

Hot Threads This Month