By DeDestruct
via dedestruct.com
Submitted: Mar 08 2008 / 00:59
Is it possible to make a transparent div with opaque text and images in it?
CSS Transparency applied to a parent div is inherited to all its children
This cannot be removed by declaring styles specific to the children. Using png images as background images for content-heavy areas may not be the best idea and wont work smoothly cross-browser.
The best solution is to seperate the content and background into seperate DIVs and apply a position:relative to the DIV holding the content. This is done within the parent element that then appears to have a translucent background.
Add your comment