473,327 Members | 2,090 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,327 software developers and data experts.

div height problem

I have been unable to get a div to have a height less than about 20 pix in
IE6.
Is there some css that I can use as an in-line style that will guarantee
that the empty div that it is applied to will have 5 pixels height?

TIA
Brian Tozer
Jul 21 '05 #1
3 6841
> I have been unable to get a div to have a height less than about 20
pix in
IE6. Is there some css that I can use as an in-line style that will guarantee that the empty div that it is applied to will have 5 pixels height?


You need to set the font-size to something small, eg. 1px, since IE
gives all divs the height of one line of text even if there are no
characters present.

Worry a bit about users who set a minimum font size. I think you'll be
OK as IE doesn't allow users to do this, and other browsers that do
allow it don't impose it when the div is empty.

--Phil.

Jul 21 '05 #2
Thanks Phil.
Brian

<ph*******@treefic.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
I have been unable to get a div to have a height less than about 20

pix in
IE6. Is there some css that I can use as an in-line style that will

guarantee
that the empty div that it is applied to will have 5 pixels height?


You need to set the font-size to something small, eg. 1px, since IE
gives all divs the height of one line of text even if there are no
characters present.

Worry a bit about users who set a minimum font size. I think you'll be
OK as IE doesn't allow users to do this, and other browsers that do
allow it don't impose it when the div is empty.

--Phil.

Jul 21 '05 #3
ph*******@treefic.com wrote:
I have been unable to get a div to have a height less than about 20
pix in IE6.


You need to set the font-size to something small, eg. 1px,


You may also need to set overflow:hidden

--
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.
Jul 21 '05 #4

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

Similar topics

4
by: Paul | last post by:
Hi, I'm wondering if someone out there can help me overcome this quandary. I need to be able to calculate the height of the current page. I need to calculate the height of the page in pixels after...
4
by: Thomas | last post by:
Hi there, I have an iframe which is editable (designMode = "on") and want to resize it dynamically as the content grows (e.g. more lines of text is in there) and there the struggle starts. I...
6
by: Jason Bassford | last post by:
Okay, What I'm trying to do is create two boxes, one on top of the other. The first is a static height, the 2nd, underneath it, should take up the remaining amount of screen space and overflow...
12
by: Kepler | last post by:
How do you get the height of the client browser in IE? Both document.body.clientHeight and document.body.offsetHeight return the height of the document. If the page is long and there's a vertical...
7
by: Just Dummy | last post by:
Hi all, I am struggling with a problem for a long time. Problem statement: I have a table and the table can contain n number of rows. i.e., the table rows will be generataed out of a xml...
4
by: reycri | last post by:
I have a page that works as I intend in IE but not in Firefox: <html> <head> <title>Overflow Test</title> </head> <body style='overflow:hidden; margin:0; padding:0;'> <table border='0'...
8
by: fredo | last post by:
This question was asked in comp.lang.javascript with no result. In IE5.x and IE6, I want to display an image when the user rolls over a text link. The image does indeed display, but only on the...
4
by: AAaron123 | last post by:
<body runat="server" id="MainBody"> <form id="form1" runat="server" style="background-color:green; width: 100%; height: 100%"> <br /> Table1" runat="server" Style="background-color:Yellow;...
2
by: ziycon | last post by:
I have the below code, when a user clicks on the <a href="#" onclick="showhide('languages'); return false;">Language(<div id="current_lang">en</div>)</a> it shows a DIV that is hidden and when...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.