473,385 Members | 1,930 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

div tag height minimum in IE

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
Jul 24 '05 #1
2 5662
Els
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 -
Jul 24 '05 #2
On Sat, 14 May 2005 19:36:09 +0200, Els <el*********@tiscali.nl>
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!
Jul 24 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Stefan Krause | last post by:
If a line-height is defined for a text and an image (e.g. 9px wide and 7px high) is inserted the line-height will be altered (e.g 15 instead of 16 pixels) for IE 5.0, 5.5. and 6.0. Here's an...
5
by: Chandler | last post by:
Hi, I have a div with a background image. The height of the div needs to stretch to accomodate any changes of internal content, but needs to remain at least 400px so that the background image is...
5
by: S | last post by:
Whew! Thanks for your help on that last post. I actually understand what you wrote. I'm trying not to use these groups as a way to get my code written for me, I really want to understand what...
2
by: Chuck Bowling | last post by:
I'm trying to figure out how I can get the minumum height required for a textbox containing a string in a given font with a set width and also the converse, the minimum required width of a textbox...
15
by: Jeff | last post by:
I have some divs (float: left) that I'd like to set a minimum height on. What's the level of support on min-height and are there any bugs I need to watch out for. I've never used this, and I...
3
by: Q. John Chen | last post by:
I have a page contains a table (e.g a 3-row table). The middle row is for the content and the bottom row is for footer notes. When the middle row does not have much info, the footer goes way too...
2
by: =?Utf-8?B?UGhpbCBKb2huc29u?= | last post by:
Hi, I have a gridview and I need it to display correctly in Opera. I need to set the row height, so that even on the last page of data all the rows are the same height as on the other pages. ...
2
by: ssmeshack | last post by:
Hai all, Im having problem to set minimum height to <td> tag. It only takes height only not min-height. Im ie7 browser and developing web based system in Visual Web Deveploper 2008 (C# .Net). ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.