<div id='wrapt'>
<img id='logoc' src='https://upload.wikimedia.org/wikipedia/commons/c/c7/Porto_Covo_pano_April_2009-4.jpg' alt='img'>
</div>
#wrapt{
margin-top:45px;
position:relative;
background:#000;
border-bottom:2px solid red;
border-top:2px solid red;
}
#logoc{
display:block;
width:50%;
margin:25px auto;
}
If I remove borders from #wrapt
(2px solid red) - #logoc
looses its margins !
So, how to keep margins without borders on parent?
This qustion is not duplicated with this.
It's not about margins/paddings on parent/child.
My question is:
Why child's margins deppends of parent's BORDERS ?