Solved

CSS how to remove transperant background

Posted on 2008-10-14
7
1,578 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
[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
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
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 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

Industry Leaders: 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

Title # Comments Views Activity
Read text on Table 7 49
How to get chosen background-color on every line? 10 44
Display Flex does not Wrap Items 2 46
Check for Numeric Phone Field 14 48
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to count occurrences of each item in an array.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

739 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