HTML CSS examples for CSS Widget:Border Style
Create a border outside from a width-specified element
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> body{<!--from ww w . j av a 2 s. c om--> background: red; } #element { width: 350px; border: 5px solid rgba(0,0,0,0.2); } #element2 { width: 350px; border: 5px solid rgba(0,0,0,0.2); box-sizing: border-box; } </style> </head> <body> <div id="element"> test content </div> <br> <br> <div id="element2"> test content </div> </body> </html>