I have a widget that cannot be packaged in another div.
My question is how to remove the border from the header / header, but still keep it around the rest of the DIV? An example is below.
Adding a border only to .body is impractical because if the end user adds an addition to the bottom / top of the widget, things div break.

<div class="widget"> <div class="header">Header Title</div> <div class="body">My Content</div> </div> .widget { height: 100px; width: 130px; border: 3px solid blue; position: absolute; overflow: hidden; } .header { width: 100%; min-height: 24px; max-height: 24px; display: block; background-color: grey; color: white; } .body { width: 100%; height: calc(100% - 24px); }
http://jsfiddle.net/botwfngv/
source share