Click here to get back home

div tag height minimum in IE

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
div tag height minimum in IE Rob T. 05-14-2005
Get Chitika Premium
Posted by Rob T. on May 14, 2005, 11:33 am
Please log in for more thread options


I'm trying to use a div tag to make an element of height 16 pixels but
IE forces it to be 19 pixels. Anything smaller than 19 gets enlarged
to 19. Is there any way around this?

#row1
{
background: #0000FF;
width: 766px;
height: 16px;
}

That's pretty much all I'm trying to do, but IE makes it 19 pixels in
height.

Rob

Posted by Els on May 14, 2005, 8:36 pm
Please log in for more thread options


Rob T. wrote:

> I'm trying to use a div tag to make an element of height 16 pixels but
> IE forces it to be 19 pixels. Anything smaller than 19 gets enlarged
> to 19. Is there any way around this?
>
> #row1
> {
> background: #0000FF;
> width: 766px;
> height: 16px;
> }
>
> That's pretty much all I'm trying to do, but IE makes it 19 pixels in
> height.

IE extends heights to encompass the contents.
If you set the font-size and line-height to less than 16px (even if
the div is empty), the div will probably stick to the assigned 16px
height.

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -

Posted by Rob T. on May 14, 2005, 11:41 am
Please log in for more thread options


wrote:

>Rob T. wrote:
>
>> I'm trying to use a div tag to make an element of height 16 pixels but
>> IE forces it to be 19 pixels. Anything smaller than 19 gets enlarged
>> to 19. Is there any way around this?
>>
>> #row1
>> {
>> background: #0000FF;
>> width: 766px;
>> height: 16px;
>> }
>>
>> That's pretty much all I'm trying to do, but IE makes it 19 pixels in
>> height.
>
>IE extends heights to encompass the contents.
>If you set the font-size and line-height to less than 16px (even if
>the div is empty), the div will probably stick to the assigned 16px
>height.

That works, thank you!

Similar ThreadsPosted
Make textboxs height = the height of the cell it's in minus (n)px August 6, 2004, 6:37 am
Adjust height base on the the height of the browser window. October 20, 2006, 4:23 pm
max height for tr? May 15, 2006, 1:48 pm
CSS design and 100% height September 16, 2004, 2:30 am
there is no attribute "HEIGHT" November 10, 2004, 6:27 pm
Doing without table height January 6, 2005, 4:38 pm
simple height 20% February 6, 2006, 3:07 pm
Problems with min-height November 15, 2006, 3:38 pm
fieldset height February 13, 2007, 10:03 am
div tag with height in percentage March 5, 2008, 6:04 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap