homepage Welcome to WebmasterWorld Guest from 54.161.214.221
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

    
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:

[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

 

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! ;)

Nick

SuzyUK




msg:1192472
 9:12 pm on Feb 5, 2003 (gmt 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

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.

Derek

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved