Solved

Can't get a div's background color to show.  Could it be a misplaced semi-colon?

Posted on 2013-06-17
5
275 Views
Last Modified: 2013-06-17
Hello CSS Experts,

I had to redo a style sheet on a site (work in progress) and somehow I am unable to get a background color to show in one of my divs.

Here's the link:  Link to site

The div class is "footer". Right now it is colored #2E110C.  I don't want it to have any color at all.  I want it to be clear -- revealing the page's background graphic (paws-2.jpg) to show through uninterrupted.

You'll see via firebug my attempts to give that container a background color of  . But it is not working.

It looks like the div "container" is controlling the color in "footer".

Any suggestions?

Thanks

Rowby
0
Comment
Question by:Rowby Goren
  • 2
  • 2
5 Comments
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 39254867
I think it is line 6078 on your template.css, get rid of the 2nd line background-color: #2E110C;

.container {
      max-width: 1100px;
      background-color: #2E110C;
}

should be
.container {
	max-width: 1100px;
	
}

Open in new window

0
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
ID: 39254879
Just remove the div container from the footer, makes no sense for it's use in your context.
If you want auto centered content then add a div called wrap to everything and just add
margin:0 auto to that.
Repeating classes makes sense where you want elements styled the same - you don't so don't use them.
0
 
LVL 9

Author Comment

by:Rowby Goren
ID: 39254902
Hi GaryC123

I removed the class and it did the trick!

Thanks!

Rowby
0
 
LVL 58

Expert Comment

by:Gary
ID: 39254920
It works in context but you need an auto margin/width because you're footer is now out of sync
So add a class like this
.footer {
margin: 0 auto;
width: 940px;
}
0
 
LVL 9

Author Comment

by:Rowby Goren
ID: 39254930
Yup.  Thanks  I'll add that.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As a result of several questions about how to use Bootstrap I thought it would be a good idea to write down the development aspect of creating a Bootstrapped website in as little time as possible. Part 1 of this article will only concentrate on g…
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question