Space between border and content - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Border Style

Description

Space between border and content

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">

#content{<!-- w w w  .j  av  a 2 s.com-->
   width: 100px;
   min-height: 100px;
   margin: 20px auto;
   border-style: ridge;
   border-color: #567498;
   border-spacing:10px;
   position:relative;
   background:#000;
}
#content:after {
   content: '';
   position: absolute;
   top: -15px;
   left: -15px;
   right: -15px;
   bottom: -15px;
   border: red 2px solid;
}


      </style> 
 </head> 
 <body> 
  <div id="content"> 
  </div>  
 </body>
</html>

Related Tutorials