PDA

View Full Version : Help With Opacity Settings In HTML/CSS 4.01


CalmWaters
February 23rd, 2006, 05:58 PM
Basically I need the main background on my website to be visable through the are where I am typing but faded out a bit. I have found the coding but it isn't in CSS form, which is what I need it in (dont ask why... :hmm: ). So far I hav found out about using the {filter:alpha (opacity=50);} stylesheet coding but I just can't make it work, the background colour still appears solid!!!
Any help would be appreciated.

oracle128
February 23rd, 2006, 07:38 PM
The CSS code you have for transparency is proprietry to IE. This guy suggests defining transparency three different times (http://www.domedia.org/oveklykken/css-transparency.php) to cover all the browsers that use it differently.

CalmWaters
February 24th, 2006, 04:00 PM
Thanks alot Oracle, thats just what I've been looking for. Page=Bookmarked ;), EDIT:but theres just one problem... I can't get the text text to work so that the text isn't included in the opactiy...
AFTER YET ANOTHER EDIT: I've fiddles around with some of the <divs> and got it working, thanks again.

oracle128
February 24th, 2006, 04:22 PM
The transparency will apply to any component that has the CSS class you defined as being transparent. If your transparent box has the text within it (it's a text box, or a text-background effect), it will apply to both the box and the text. You need to have the transparent box and the text as different HTML components (and thus be using different CSS classes) so the style of the two aren't linked.