Solved

CSS how to remove transperant background

Posted on 2008-10-14
7
1,577 Views
Last Modified: 2008-11-02
Hello,
I have a pop box that has a transparent background (I think it inherits the css from the parent div's) due to which the background becomes confusing.

How should I avoid a Tranasparent background for only the pop-box anything that I add to the div to make it non transparent ?
0
Comment
Question by:micro_learner
7 Comments
 
LVL 82

Expert Comment

by:hielo
ID: 22714863
assuming the popup div had id="popup", then you just need to specify a background specifically for that div:
#popup{
 background-color:white;
 background-image:url();
}
0
 

Author Comment

by:micro_learner
ID: 22715002
Thank you, but even when I add an image as the background, the image itself is being transparent ..odd but true.I can see the background through it
0
 
LVL 42

Expert Comment

by:David S.
ID: 22715049
It sounds like you changed the opacity an an ancestor element.
0
Technology Partners: 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!

 

Author Comment

by:micro_learner
ID: 22715067
>>It sounds like you changed the opacity an an ancestor element.

How do I solve it ? is there a way I can do something in the child ?
0
 

Author Comment

by:micro_learner
ID: 22715379
Please help me out guys
 
0
 
LVL 42

Expert Comment

by:David S.
ID: 22716299
It's difficult to help without seeing your code.

You would remove the opacity declarations from the ancestor. Opacity is inherited and there is nothing you can do to override it on descendants.
0
 
LVL 1

Accepted Solution

by:
Rapturer earned 500 total points
ID: 22716469
Hi micro_learner,

It might be much easier for you to use an in-line style. CSS applies styling in a very specific order of precedence.

You can override other ancestors by using inline styling:

<div id="popup" style="background-color:white; background-image:url();" >
>POPUP CODE<
</div>

This should work for you.

Best,

Rapturer
0

Featured Post

Technology Partners: 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

Suggested Solutions

Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
Find out what you should include to make the best professional email signature for your organization.
The viewer will learn how to dynamically set the form action using jQuery.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

713 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