Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

SOLVED: 5 px border added to button, Button size increases. Box-sizing not working

Twikss Power:

On button I am adding active class with 5px Border-bottom. Button size increases by 5px. I dont want to get button size increased. Is there any simple way to do so? Box-sizing not working.


*,
*:after,
*::before {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}

.container {
width: 100%;
border: 2px solid blue;
}

.button {
background: black;
width: 150px;
border: 0;
padding: 20px;
margin: 0;
color: white;
}

.active {
border-bottom: 5px solid yellow;
}








Posted in S.E.F
via StackOverflow & StackExchange Atomic Web Robots
This Question have been answered
HERE


This post first appeared on Stack Solved, please read the originial post: here

Share the post

SOLVED: 5 px border added to button, Button size increases. Box-sizing not working

×

Subscribe to Stack Solved

Get updates delivered right to your inbox!

Thank you for your subscription

×