|
Give this a try. Replace the .body_child with whatever class name you have used. The wrapper should give you 50% opacity (transparency) and the transparency removed for the child.
.body_wrapper {
padding: 0 20px 20px;
-webkit-border-radius: 5px;
_display: inline;
background-color: #000000;
filter:alpha(opacity=50);
-moz-opacity:0.5;
-webkit-opacity:0.5;
opacity: 0.5;
}
.body_child {
filter:alpha(opacity=100);
-moz-opacity:1.0;
opacity: 1.0;
-webkit-opacity: 1.0;
}
modified 1-Aug-19 21:02pm.
|
|
|
|
|
Hi Richard,
that seems like a great solution, but I came across a snag, not to do with the code you posted (it would work fine) but more to myself, a small problem that I created meaning I can't use that code. All the code for child elements inside the body_wrapper are on my webpages, not my CSS and now I have over 300 webpages and can't go in and put the code in the CSS file as it would take to long to put the code there and remove the code from each page
I had an idea though but couldn't find a solution that uses a CSS file only. I have a background image I wanted to use instead of this:
background-color: #000000;
Now I wanted the whole image to be 50% transparent like what I wanted to do before I realised my screw up. I have looked about and only found ways of making parts of the image transparent when you insert them on a webpage, but is is possible to make the whole image semi transparent? This would solve my issue then as the image would be transparent and I wouldn't have to modify any more code to fix the parent/child transparecy issue.
Thanks
David McCormick
In the end we're all just the same
|
|
|
|
|
David,
You might be able to do something like
.body_wrapper {
background-image:url(path_to/image_name.jpg);
height:100%;
filter:alpha(opacity=50);
-moz-opacity:0.5;
-webkit-opacity:0.5;
opacity: 0.5;
}
Because of CSS inheritance rules http://www.w3.org/TR/CSS2/cascade.html[^], the above might not do what you want
modified 1-Aug-19 21:02pm.
|
|
|
|
|
As an alternative, instead of editing file by file the code within those 300 pages, you could use Notepad++ [^] and do similar to this [^]or you may be able to do a similar thing with Windows Grep [^]. That's just a thought for you ...
modified 1-Aug-19 21:02pm.
|
|
|
|
|
Try this:
.body_wrapper
{
background-color: rgba(0,0,0,0.5);
}
It will work in browsers that support CSS3, which is becoming more common. Don't know about earlier IE's in particular though, I'm sorry to say.
The above code simply sets the div to have a semi-transparent background (approx. 50% black). It's called ARGB.
HTH.
modified on Saturday, August 7, 2010 3:11 AM
|
|
|
|
|
Thanks all got it . I tried the rgba(0,0,0,0.5); and it worked, but not on IE so I thought and then did this and now it works in IE:
.Body_Wrapper<br />
{<br />
background-color: rgba(0,0,0,0.5);<br />
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#80000000,endColorstr=#80000000);<br />
zoom: 1; <br />
} <br />
In the end we're all just the same
|
|
|
|
|
Glad to help.
Posted from SPARTA!!!!!!!!!! 2.0.
Don't forget to rate my post if it helped!
|
|
|
|
|
|
|
However, IE being the default broswer that a lot use, I would like the transparacy to work well in it, I use google analytics and more people view my current site in IE than in other browsers, and if the text doesn't look smooth and normal on it, its not really going to help much, its not so much important that the website doesn't look 100% in other browsers as I can say this on my home page.
In the end we're all just the same
|
|
|
|
|
All I can say mate, is good luck.
IE is a bitch to design for. End of story.
Until IE9 is mainstream, IE is going to be the most hated browser for web designers. Trust me, not-so-smooth text seriously is the least of your worries. People aren't going to immediately leave because of it.
Posted from SPARTA!!!!!!!!!! 2.0.
Don't forget to rate my post if it helped!
|
|
|
|
|
Thanks, your right. I'll see what I can do, I know IE is annoying. Its just that the tex seems harder to read this way and if people find the text a bit hard to read, they won't stay long. I'll see what I can do.
In the end we're all just the same
|
|
|
|
|
|
I already use a reset CSS, but thanks
In the end we're all just the same
|
|
|
|
|
hi!
my question is:
i have taken two hindi e-paper. in first e-paper i have no problem to read it.
but in 2nd e-paper the font is unable to read. the look like other character.
can anyone say why?
is this problem of unicode.
thanx
|
|
|
|
|
Are you developing the pages or reading someone's page?
|
|
|
|
|
how to use jquery to be like this?? this is a city selector.,it is use jquery to be. but i want to know how to come true??
who can help me? thank u of before!!.
foe me a example or source code!!!
|
|
|
|
|
Absolutely no idea what you are asking: your question (if that's what it is) is incomprehensible.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
Looking into building a website that provides options for the user to change the countertop by selecting the color and viewing the change in the sample room instantaneously, changing wall colors, etc.
What is a good tool there to use for this?
|
|
|
|
|
I think you need to represent building in 3D and also the sample rooms.
And as user selection change colors of the flooring or any wall of the room
dynamically.
You need to develop your application in Silverlight or WPF for best output,
and you also need to use 3D Image viewer[^] to show your image in 3D.
You need also color picker which is available easily. And then
according to the selection you need to apply generating image
based on color selection.
There isn't any ready made tool available for the same.
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
|
|
|
It is where a bunch of twats spam a community page, like you, twat!
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
|
|
|
|
|
A web development company that does not know what web development is.
Well that explains the need to spam the community. I guess you don't know that Google bombing doesn't work any more either!
|
|
|
|