Solved

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

Posted on 2013-06-17
5
271 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

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…
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to define a gradient in CSS. Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Gradient. Define the background as "linear-gradient(to right, #ee3668, black)". Ensure you …
In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…

747 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now