kvnwpts — 2012-03-11T19:48:22-04:00 — #1
How is this done with the semi transparent thing on the upper thing and the "wrapper" going up in it on http://www.netdreams.co.uk/
And btw, as you can see ive created like 100 threads already, but I wanna learn webdesign sooo much! :/
ryanreese — 2012-03-11T20:27:02-04:00 — #2
background: url("css/images/top-bg.png") repeat-x;
That's the code for that grayish transparent part. It is a PNG image which allows for alpha transparency. That's how the transparency look is given :).
66 posts and you've made 100 threads?
kvnwpts — 2012-03-12T12:27:34-04:00 — #3
tehyoyo — 2012-03-12T15:56:34-04:00 — #4
Keep in mind that, in CSS3, there is a new added alpha (transparency) channel. As such, you can define transparency in the color, like:
That would be a semi-transparent black.
Another way is opacity.
Although it is CSS3 and both are semi-supported - [RGBA --- [URL="http://caniuse.com/#search=opacity"]Opacity](http://caniuse.com/#search=rgba)
kvnwpts — 2012-03-12T19:18:58-04:00 — #5
Ty, overclass for me now. Ill try stick with the basics first
tehyoyo — 2012-03-12T20:43:02-04:00 — #6
Just making sure you keep it in mind
Always useful, I find.
kvnwpts — 2012-03-13T04:30:18-04:00 — #7
I do as much as i can.
system — 2012-03-14T07:57:34-04:00 — #8
I'd suggest the opacity property as TehYoyo suggested, since RGBA support is... sketchy at best. If you use the opacity property and a IE filter you have to worry that anything inside your DIV will ALSO have transparency applied to it -- and you probably don't want that. The solution is a empty sandbag DIV before all your content.
While it takes an extra markup element, it also happens to work all the way back to IE 5.5. Basically the margin-bottom just makes everything after the div ride up over it. It also means you don't have to play with positioning, or worry about opacity inheriting to any child elements. If the div was wrapping your header area content, delcaring opacity on it would also make everything in the header transparent -- and you probably don't want that.
Of course, if legacy versions of IE supported :after and :before properly, you could also add the extra sandbag that way; unfortunately they don't. You could use an expression to fake it, but that ends up being a needlessly complex mess -- at which point, just use the sandbag.
... and in this case I'd do this long before I'd go for an alpha transparent .png -- but as a rule of thumb I don't consider alpha transparent images to be viable for web deployment due to the larger filesizes, unusual cross browser behaviors, need for filters to make them work in legacy IE... etc, etc...