Solved

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

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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

This article discusses four methods for overlaying images in a container on a web page
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
In this Micro Tutorial viewers will learn how to create a CSS image sprite (In a later tutorial, viewers will learn how to use CSS and HTML to create a navigation menu using this sprite) Open a new Photoshop document with a width of (Icon width)x(N…
Suggested Courses

617 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