Borders with box-shadow
Borders can be created using box-shadow
without breaking layout when using box-sizing: border-box
.
The syntax for that is this:
box-shadow: 0 0 0 {width} {color};
Pro: Doesn't break layout
Con: Only solid borders, not descriptive
Written by Erik Royall
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Css
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#