Can i make two buttons with 1em padding - one with a background color and other with a border, to have the same height? Basically to have the border inside of the div.
Tried to use box-sizing: border-box; method, but that didnt solve my problem.
Html:
<div class="button1">Button1</div>
<div class="button2">Button2</div>
CSS:
*, *:before, *:after {
-moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;
}
.button1 {
padding: 1em;
border-style: solid;
border-color: #666;
border-width: 4px;
display: inline-block;
}
.button2 {
padding: 1em;
background-color: #e54;
display: inline-block;
}
Can't wrap my head around it, seemed like a logical solution. Thanks in advance.