Reputation: 5488
#controlpanel .button
{
margin: 12px 12px 0px 12px;
width: 100%;
}
How do I make these buttons fill the width of the white box, and yet have 12px on each side? Padding adds space internally... and margin makes them go off the white box.
Upvotes: 0
Views: 101
Reputation: 3189
Two things may help:
div#controlpanel
In addition you could also try to remove the 100% width.
Upvotes: 0
Reputation: 3516
The problem is the width: 100%;
.
Try to comment out that line and type: display: block;
Upvotes: 0
Reputation: 405
add box-sizing:border-box to buttons and you should get smth like:
#controlpanel{
padding:0px 12px 12px 12px;
}
#controlpanel .button {
margin: 12px 0px 0px 0px;
width: 100%;
box-sizing:border-box;
-o-box-sizing:border-box;
-moz-box-sizing:border-box;
-ms-box-sizing:border-box;
}
Upvotes: 1