[Javascript] DIV height problem in IE

Roger Roelofs rer at datacompusa.com
Sun Nov 19 22:48:50 CST 2006


vijay,

On Nov 19, 2006, at 10:47 PM, vijaykumar bavareddy wrote:

> Hi, trying to place DIV with height less than 15 using below code..  
> its works fine in firefox but not in IE.. in IE its showing height  
> around 15px by default.. please help in this regard...

> div#vscl{
>         position:absolute;
>         left:673px;
>         top:17px;
>         width:20px;
>         height:1px;
>         background-Color:red;
>         }
>         </style>

This is actually a css question.  You can get good answers from the  
css-discuss wiki at
http://css-discuss.incutio.com/

The short answer is that ie is forcing the div to be tall enough to  
contain one line of text at the default font-size.  One solution is  
set font-size: 1px;

-- 
Roger Roelofs
Datacomp Appraisal Services

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20061119/3a39e5e2/attachment.htm>


More information about the Javascript mailing list