Welcome to WebmasterWorld Guest from 184.108.40.206 , register , free tools , login , search , pro membership , help , library , announcements , recent posts , open posts Become a Pro Member
IE, 1px box height problem dbasch msg:1192469 6:15 pm on Feb 5, 2003 (gmt 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:
<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>
Edouard_H msg:1192470 6:45 pm on Feb 5, 2003 (gmt 0)
Seems only to occur if your div is the lone element on the page. Nick_W msg:1192471 7:08 pm on Feb 5, 2003 (gmt 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! ;)
SuzyUK msg:1192472 9:12 pm on Feb 5, 2003 (gmt 0)
to override the default font size it's this that's causing the div to be 8-10px high..
dbasch msg:1192473 9:17 pm on Feb 5, 2003 (gmt 0)
Thanks Suzy! I thought it may have been something to do with font size.