- This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
I’m looking to make the background of a div transparent, without affecting child elements, by using an opaque single pixel image to fill the div, instead of making all elements in the div opaque using CSS. I seem to be having a bit of trouble getting it to work and want to be sure I understand the background syntax correctly.
`background: url (“/images/example.png”);`
If I don’t specify a repeat x or y then the image will automatically repeat to fill it’s container, correct?
just dont set a background
Except I want some sort of background. Here is the website I’m referring to:
http://sc30.sawyerwebworks.com/
I’m looking to make the box on the left side of the slider opaque, so that some of the background image of the slider image can be seen through, but not so much that the text becomes difficult to read. It seems the best way to do that is through a repeating single pixel image. Which goes back to my original question, above.
> If I don’t specify a repeat x or y then the image will automatically repeat to fill it’s container, correct?
Correct.
You can also just do
background: rgba(255,255,255,0.5);
Or whatever color you want!
If you’re okay with [<= IE8 users](http://caniuse.com/#feat=css3-colors) not getting that background (or better give them a fallback color or that image anyway)