Jump to content


Photo

IE line height issue


  • Please log in to reply
2 replies to this topic

#1 Ricklord

Ricklord
  • Members
  • PipPipPip
  • Advanced Member
  • 60 posts

Posted 29 August 2006 - 01:28 PM

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.

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

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

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

<div id="content_top"></div>

any fixes for this IE problem?

cheers

Rick

#2 ToonMariner

ToonMariner
  • Members
  • PipPipPip
  • Advanced Member
  • 3,342 posts
  • LocationNewcastle upon Tyne, UK

Posted 29 August 2006 - 08:42 PM

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

<div class="content_top"></div>

and the css

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

follow me on twitter @PHPsycho

#3 dustinnoe

dustinnoe
  • Members
  • PipPipPip
  • Advanced Member
  • 187 posts
  • LocationWarner Robins, GA

Posted 04 September 2006 - 10:21 AM

Use the xhtml strict Doctype.  This will force IE6 to render the box model properly.  Why does IE have to be different?

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

Hope this helps!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users