Home › CSS Tutorial › CSS borders
CSS borders
Style the edge of a box.
Set border-width, border-style and border-color, or the shorthand border. Style one side with border-left etc.
Example code
<style>
.a{border:3px solid navy;padding:8px}
.b{border-left:8px double tomato;padding:8px;margin-top:10px}
</style>
<div class='a'>All sides</div><div class='b'>Left only</div>