By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,655 Members | 1,860 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,655 IT Pros & Developers. It's quick & easy.

Why is IE ignoring my height decleration?

P: n/a
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

Oct 2 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Els
jo***********@yahoo.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/
Oct 2 '06 #2

P: n/a
Perfect, thanks mate.

Els wrote:
jo***********@yahoo.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/
Oct 2 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.