Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Adding a button creates white space between div's Reply To: Adding a button creates white space between div's

#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%;
}