As most people know,
a 100% div with a 5px padding is actually 100% + 10px wide.
One obvious solution to this is to wrap the child div in a wrapper that has
Block elements like s automatically assume a 100% width after padding. I.e. you should be able to achieve the desired effect simply by specifying a padding, leaving the width on auto and making sure the element has display: block (default for ). http://jsfiddle.net/EMYBm/8/ 0 讨论(0) 查看其它2个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复
s automatically assume a 100% width after padding. I.e. you should be able to achieve the desired effect simply by specifying a padding, leaving the width on auto and making sure the element has display: block (default for ). http://jsfiddle.net/EMYBm/8/ 0 讨论(0) 查看其它2个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复
auto
display: block
). http://jsfiddle.net/EMYBm/8/ 0 讨论(0) 查看其它2个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复
http://jsfiddle.net/EMYBm/8/