CSS at its best

Tag Archive for div

Overlapping transparent divs with one border

Overlapping transparent divs I recently came upon a question on http://stackoverflow.com. A user asked if it was possible to have two transparent divs that overlap and force the overlapping section to have the same opacity. His example looked like this: <div id="foo"> <div id="bar"> </div> </div> #foo{ height:50px; width:250px; background:rgba(0, 0, 0, 0.6); position:absolute; left:150px; top:150px; color: #fff; padding:50px; }…