MyBB Community Forums

Full Version: how to make container bg transparent
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How do I add opacity to the container bg.


Thanks Smile
Go to Admin CP -> Themes & Style > Themes > **your theme** > global.css > #container:

And put this code as the background.
background: transparent url(http://i46.tinypic.com/osfrzr.png) top left repeat;
I think he means fully transparent, so theres no background?
If so, just remove the colour from the "background:" part.
That would be... empty? He said transparent, and mentioned opacity, so I guess that was what he meant.
AFAIK you can't do that. A container can have opacity, but not just it's background if it is an image. A background can be transparent if it has a solid color, using CSS3. But then, you're limited to modern browsers (en IE8 isn't modern). Personally I don't care much if IE8 can't see my effects, but you have to make sure, that your site will still be usable. So you can' use a 5-10% opacity considering that users will see what's below the layer, because IE8 will have it a 100%.

IE8 solution would be:
div { background: transparent; background: rgba(200, 54, 54, 0.2); }
Transparent on non CSS3 browsers, 20% on others.

Note that I didn't try IE8 for this, but I don't think it supports any CSS3.
The solution I presented works on all browsers, without any hacks or un-reliable code.
faviouz, your solution makes the layer semi-transparent, not just the layer's background.