Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

CSS how to remove transperant background

Posted on 2008-10-14
7
Medium Priority
?
1,584 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 43

Expert Comment

by:David S.
ID: 22715049
It sounds like you changed the opacity an an ancestor element.
0
Independent Software Vendors: 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 43

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
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…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Suggested Courses

916 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