How to have an inner DIV width go outside the padding of the outer DIV?
<div style="padding:20xp;width:100%;"
<div style="width开发者_运维知识库:?????">
<div>
</div>
I would like the inner div to fill the screen completely, even when the outer div has 20px padding. How can that be done? thanks.
Give the inner <div>
a negative margin to negate the padding and fill the width, example:
<div style="padding:20px;">
<div style="margin: -20px;">
Content Here
<div>
</div>
精彩评论