HighDots Forums  

Why is IE ignoring my height decleration?

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Why is IE ignoring my height decleration? in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
john_aspinall@yahoo.co.uk
 
Posts: n/a

Default Why is IE ignoring my height decleration? - 10-02-2006 , 02:51 PM






Ive set a block 10 pixels high to display a background image on my
site, Fifrefox is OK with it, yet IE seems to be ignoring it totally?

You can see it here, Ive added a red border round the offending element
to illustrate my point. Compare IE's rendition with Firefox

This is the CSS rule Ive set:

#bodyBackground {
background-image: url(../images/body_top.png);
background-repeat: no-repeat;
height: 10px;
border: 1px solid #FF0000;
}

This is the page

http://www.ainewmedia.co.uk/index.asp


Reply With Quote
  #2  
Old   
Els
 
Posts: n/a

Default Re: Why is IE ignoring my height decleration? - 10-02-2006 , 03:12 PM






john_aspinall (AT) yahoo (DOT) co.uk wrote:

Quote:
Ive set a block 10 pixels high to display a background image on my
site, Fifrefox is OK with it, yet IE seems to be ignoring it totally?
IE is stretching the element's height to encompass the content. Now I
know there is no content in it, but IE still gives it the minimum
height required to contain a character. To avoid that you could set
the font-size and the line-height to a small enough size for that
element, or give it overflow:hidden;.

--
Els http://locusmeus.com/
accessible web design: http://locusoptimus.com/


Reply With Quote
  #3  
Old   
john_aspinall@yahoo.co.uk
 
Posts: n/a

Default Re: Why is IE ignoring my height decleration? - 10-02-2006 , 05:11 PM



Perfect, thanks mate.

Els wrote:
Quote:
john_aspinall (AT) yahoo (DOT) co.uk wrote:

Ive set a block 10 pixels high to display a background image on my
site, Fifrefox is OK with it, yet IE seems to be ignoring it totally?

IE is stretching the element's height to encompass the content. Now I
know there is no content in it, but IE still gives it the minimum
height required to contain a character. To avoid that you could set
the font-size and the line-height to a small enough size for that
element, or give it overflow:hidden;.

--
Els http://locusmeus.com/
accessible web design: http://locusoptimus.com/


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.