Home › Forums › CSS › Adding a button creates white space between div's › Reply To: Adding a button creates white space between div's
May 5, 2014 at 8:59 am
#169238
James
Participant
The following code in your CSS:
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box
box-sizing: border-box;
}
… is the reason your border removes this “white space”. However, this is a good thing.
https://css-tricks.com/box-sizing/
The reason there could be white space, is because the <button>
element has default margin values.
Use this:
button {
margin:0;
}
PS, I strongly advise removing this from your CSS:
div {
min-height: 10%;
}