Solved

CSS how to remove transperant background

Posted on 2008-10-14
7
1,576 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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

Suggested Solutions

Title # Comments Views Activity
push Book Today button to right 10 34
How do I pull the base url for use in html links 7 31
Hide un-named HTML Label with CSS 14 36
Accessing specific element - DOM PHP HTML 8 34
This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
The viewer will learn how to dynamically set the form action using jQuery.

809 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