View Full Version : Resolved Deactivate background: transparent?

04-20-2011, 05:11 PM
I've a site that I need to add in the CSS for the BODY:
background: transparent

But, for one particular DIV ID, I need it to not be transparent -- yet, when I assign it a color: background: #FFFFFF, it doesn't "take," it's still transparent.

Is there something I can do to pointedly make the background not do that for that DIV?


04-20-2011, 05:17 PM
Is there something I can do to pointedly make the background not do that for that DIV? No! There may be something else that plays in your case and surely we can't guess it without seeing your code a link to your page.

04-20-2011, 05:24 PM
so you have:

body {
background: transparent;

is that right? What color do you see? What do expect to happen?

For example:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<html xmlns="http://www.w3.org/1999/xhtml">

<style type="text/css">
html {
background: pink;

body {
background: transparent;

div {
height: 800px;
background: #9dd;
width: 100px;




gives me a pink background for the html{}, no background for the body{} and a blue div.

If you have set your default background by the OS, then you have to remember that not everyone will have the same color as you.

04-20-2011, 07:11 PM
Gah! Thanks for Firebug in Firefox, I discovered the DIV was nested in another DIV, and I was altering the wrong DIV. I fixed it.
Thanks for the replies!

Oh, and abduraooft: I wasn't expecting anyone to guess; I was hoping maybe there was a quirk of CSS that I wasn't aware of. After all, there's a clear:both which "turns off" float, for all I knew there was a background:reset; or something I didn't know about. :)

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum