Solved

CSS how to remove transperant background

Posted on 2008-10-14
7
1,574 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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…

758 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now