HTML CSS examples for CSS Widget:Border Style
Set border based on padding from content
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> #container {<!-- ww w . j a v a 2 s . co m--> margin: 0px 60px 0px; } #eachitem { padding: 5px 2px 5px 5px; border: 5px solid black; display: inline-block; word-wrap: break-word; } </style> </head> <body> <div id="container"> <div id="eachitem"> Lorem ipsum dolor sit amet. </div> </div> </body> </html>