Advertisement

05.06.2008 at 02:24PM PDT, ID: 23381018
[x]
Attachment Details

Overriding the background-color property in style1.css with no background-color style2.css

Asked by gabrielPennyback in Cascading Style Sheets (CSS), Macromedia Dreamweaver

I have a style for #container in the main CSS for my site which works for all skins fin the site, except the one in which I want  #container to be semi-transparent. (See attached).
Overriding the background-image is easy enough with this one line of code in a secondary CSS:

#container {background-image: url(../images/Opacity60.png)}

The problem is that the background color property from the main code perseveres.  I tried getting rid of it by adding: "bakground-color: none;"   but  that isn't a valid property and it doesn't work.

The object here of course is to never have to change the html by adding a separate #container2 style, so how do I do this just within CSS?

Thanks!

JohnStart Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
#container {
	width: 890px;
	height: auto;
	font-family: "Gill Sans MT";
	font-size: 16px;
	margin: 0 auto;
	float: left;
	line-height: 24px;
	background-color: #FFFFFF;
	background-image: url(../images/CowSpotsWatermark_v4_wShad.jpg);
    }
[+][-]05.06.2008 at 02:55PM PDT, ID: 21511390

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Cascading Style Sheets (CSS), Macromedia Dreamweaver
Sign Up Now!
Solution Provided By: Kravimir
Participating Experts: 1
Solution Grade: A
 
 
[+][-]05.06.2008 at 03:31PM PDT, ID: 21511598

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628