Jump to content

Archived

This topic is now archived and is closed to further replies.

Ricklord

IE line height issue

Recommended Posts

Ok so we fixed the pargraph issue and i have now changed my top images for my containers to be 10px high so the padding looks nice all the way around.

In IE it keeps the line height to 20px but in firefox it works fine.

one exaxmple below.

[code]
#content_top {
width:580px;
height:10px;
background-image:url(images/content_top.gif);
background-repeat:no-repeat;
}
[/code]

i have tried max-height but this doesnt work either.

In the container in the html there is nothing there so look slike this

[code]
<div id="content_top"></div>
[/code]

any fixes for this IE problem?

cheers

Rick

Share this post


Link to post
Share on other sites
add

overflow: auto;

to the decalaration..

If this is going to be used more than once you should change from an id to a class like so

[code]<div class="content_top"></div>[/code]

and the css

[code]
.content_top {
width:580px;
height:10px;
background-image:url(images/content_top.gif);
background-repeat:no-repeat;
overflow:auto;
}
[/code]

Share this post


Link to post
Share on other sites
Use the xhtml strict Doctype.  This will force IE6 to render the box model properly.  Why does IE have to be different?

[code]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">[/code]

Hope this helps!

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.