Click to See Complete Forum and Search --> : <div> tah height problems
NikolaVeber
10-08-2003, 09:10 AM
Hi !
I have the following problem with <div> tags:
I have several layers (<div>) with images inside. I want the next layer to be directly below the one with the pic. It works ok as long as the image is heigh enough. When I have
<div style="height:11px">
the layer is higher than 11px, which causes the display problems. It makes problem in IE6, but opera5 works ok... NN6 as well.
Help pls !
David Harrison
10-08-2003, 02:26 PM
Generally I would diagnose this condition as acute crapness of IE, however if you show me some code I could probably help you further.
By the way, I don't know if anyone else has noticed this, but the minimu height for a div tag in IE is 18px. Strange, but this could be the cause of the problem.
If it is then you could just give the div tag below it a negative top margin.
I would like to see code from both of you.
Originally posted by lavalamp
By the way, I don't know if anyone else has noticed this, but the minimu height for a div tag in IE is 18px.That is dependent on the font size. Take a look at this:
<div style="height: 5px; border: 1px solid; font-size: 1px;"></div>
David Harrison
10-09-2003, 08:52 AM
Is that why, I laways wondered, although if nothing is in the div tag I wouldn't have thought it would have mattered.
Fang, for a negative margin you can just do this:
style="margin-top:-3px;"
Lavalamp wrote
Fang, for a negative margin you can just do this:
??? :confused:
spufi
10-09-2003, 11:57 AM
Originally posted by pyro
That is dependent on the font size. Take a look at this:
<div style="height: 5px; border: 1px solid; font-size: 1px;"></div>
Once I saw the limitations of the <hr> tag I played around with a small sized <div> tag to provide more of a colorful horizontal line. I then changed the font size to 1px, and used that instead. Example of it can be see at the link below. The lines that surround the menu are <div> tags having a 1px font size. I use a non-breaking space to fill the tag because I use XHTML 1.1. And yes, I know the Guestmap link means the page isn't valid. I'm sure I'll fix it at some point. ;)
http://www.lauramccandliss.com/
David Harrison
10-09-2003, 12:35 PM
Fang wrote:I would like to see code from both of you.