Create a button with 2/3 borders in CSS without additional HTML markup

06.04.2013 by Ilia Raiskin
HTML CSS Design

Demo

Button 1

Button 2

Code

Explanation

Note that you should add the size-value of the outer box-shadow to the margin value, because box-shadow doesn't move an element like a real border would do. You also have to add the size-value of the inner box-shadow to the padding.


About the author

Ilia Raiskin

Ilia Raiskin is a web designer, web developer, blogger and founder of Toolinfy.com.






Comment