Link to home
Start Free TrialLog in
Avatar of kkbenj
kkbenj

asked on

CSS Background image not displaying in IE only

I have a very simplistic page (so far) with a background image in the header portion.  Fine in FF and Chrome but nothing displays in IE8.

CSS:
header hgroupcorp h1
{
    width: 450px;
    height: 55px;
    margin-bottom: 0;
    float: left;
    background: url("/images/d.jpg") no-repeat;
}

Open in new window


HTML:
    <header>
		<hgroupcorp>
			<h1></h1>
		</hgroupcorp>
	</header>

Open in new window


I feel like I've tried everything suggested here in IE but will try any suggestions anyone can offer.

Thanks!
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

Check the image and make sure it is RGB and not CMYK.  IE doesn't like CMYK but the other browsers will display it just fine.
Avatar of kkbenj
kkbenj

ASKER

under properties of the .jpg, it lists Color Representation as sRGB.
ASKER CERTIFIED SOLUTION
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Dave is right. You can't use html 5 tags ie8 or below. To fix the issue add this to your head
<!--[if lt IE 9]>
     <script src="html5shiv.js"></script>
<![endif]-->

The shiv can be downloaded here http://code.google.com/p/html5shiv/
N
Avatar of kkbenj

ASKER

Dave - thanks.  That did the trick!
Avatar of kkbenj

ASKER

Neil_Bradley - thank you for the solution.  I didn't see it until after I closed out.
No problems. Pleased that you have it squared away.
N