View Full Version : problem with inline css statement in IE 8.0

Jack Corzine
11-30-2009, 04:07 AM
Am working on a project for college (my final in fact) and have my site coded so it is validated XHTML and CSS but am having some issues on IE displaying the background correctly in the content area. The layout of the site is as follows:
Total container is 800 X 640
The header is at top of course.
The navigation menu area is positioned on the left of the screen
The content area is on the right portion and has a background that changes according to what page you are viewing (each page has an inline statement that declares a different background)
The footer is at the bottom of the page

The problem I have is that IE is not recognizing the inline background statement. The statement I'm putting in is as follows:

<div id="content" style="background-image: url(images/contentback3.jpg)">

Shouldn't this override the background-image statemen in my external stylesheet? Each page has this with a different contentback#.jpg specified per page. It works fine with Firefox but with IE it only displays the file specified in the external stylesheet. If necessary I can provide my stylesheet and html upon request. You may also view the site at its temporary home at http://www.ufp-squad.com/leroyacres/

Thank you for your help. What I would really like to do is set it up to randomly pick the background image from a selection of images uploaded to the site but I understand that it would take javascript to do that and cannot be done strictly with CSS.

Thank you again.

Jack Corzine

Jack Corzine
11-30-2009, 04:16 AM
I'm sorry guys, I got it working, I was missing a closing ) in my original code.

If anyone has any ideas on a way to make my backgrounds rotate using just plain old CSS I would be interested in hearing about it.

Thanks anyway!

Jack Corzine