I defined a button and a div and their size once with unit of measurment px and again with em. why when i defined their size by px ,div and button is equal but when i defined their size by em button is smaller than div?
.div1 {
width: 102px;
height: 102px;
border: 1px solid blue;
}
.button1{
width: 102px;
height: 102px;
border: 1px solid red;
}
.div2 {
width: 10em;
height: 10em;
border: 1px solid blue;
}
.button2{
width: 10em;
height: 10em;
border: 1px solid red;
}
<div class="div1"></div>
<button class="button1"></button>
<div class="div2"></div>
<button class="button2"></button>