HTML CSS examples for CSS Widget:Div Border
Multiple borders around a div with a transparent layer
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .box {<!--from w ww .ja v a 2 s . c o m--> padding: 10px; background-color: #ccc; } .one-div { margin: 15px 10px; border: 5px solid blue; box-shadow: 0 0 0 5px #abc, 0 0 0 10px red; } .two-div { margin-top: 30px; padding: 5px; border: 5px solid red; } .two-div > .box { border: 5px solid blue; } body { background-color: #abc; } </style> </head> <body> <div class="box one-div"> (1 div, know color) </div> <div class="two-div"> <div class="box"> (2 divs, pure transparent) </div> </div> </body> </html>