I did a search here but I found just info about adjacent borders. Does anybody know if it is possible to add borders to all divs just to see how the current layout works.
If you just add a 1px border, it will add 2px to the width (side by side) and will - sometimes - break the current layout.
I need this just for control purposes, something to turn on/off, not for production.
thanks!
You can better use outline property instead of border, because
.outline-outer,.border-outer{
height:100px;
width:100px;
border:solid 1px blue;
}
.border{
height:80px;
width:50px;
border:solid 1px red;
float:left;
}
.outline{
height:80px;
width:50px;
outline:solid 1px red;
float:left;
}
<div class="outline-outer">
<div class="outline"></div>
<div class="outline"></div>Outlined
</div>
<br/><br/><br/>
<div class="border-outer">
<div class="border"></div>
<div class="border"></div>Bordered
</div>
Fiddle Here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With