?
Solved

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

Posted on 2013-06-17
5
Medium Priority
?
279 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 53

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 2000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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.
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Suggested Courses

719 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