954,593 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Background image problem

I added a background image to my page and it caused the background color for my content to disappear. What is the problem?

Tenni403
Newbie Poster
5 posts since Sep 2011
Reputation Points: 10
Solved Threads: 0
 

In you CSS, make sure that the bg image comes befor the by color, otherwise if the bg color is first, the bg image will override the bg color, only if the item with the bg color is inside the other item. Hope this makes sense.
- Matthew

Matthew N.
Junior Poster
101 posts since Jul 2010
Reputation Points: 10
Solved Threads: 10
 
body{background-image:url('../images/other site background.jpg')}

#wrapper{background-color: #FFFFFF;width: 900px;margin: 0px auto;clear: both}

This is how I have it now.

Tenni403
Newbie Poster
5 posts since Sep 2011
Reputation Points: 10
Solved Threads: 0
 

I have created a sample site that has a background, with center-aligned content. you can download it as an attachment.
Feel free to use the site, but the background is not mine, found it on google.
I have also included a screenshot of the page.

Attachments 1colcenterlayout.zip (166.01KB) Screenshot-1.png 210.91KB
Matthew N.
Junior Poster
101 posts since Jul 2010
Reputation Points: 10
Solved Threads: 10
 

I think so. I want to have a background image for the webpage and then have the background color of the actual content be white.

Tenni403
Newbie Poster
5 posts since Sep 2011
Reputation Points: 10
Solved Threads: 0
 

Can I email you a picture of what it looks like?

Tenni403
Newbie Poster
5 posts since Sep 2011
Reputation Points: 10
Solved Threads: 0
 

woops, sorry, I have edited my post above to include a sample site to see if it is how you want it.

Matthew N.
Junior Poster
101 posts since Jul 2010
Reputation Points: 10
Solved Threads: 10
 

Yes that is layout I want. Thank you.

Tenni403
Newbie Poster
5 posts since Sep 2011
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: