CSS child height 100% with parent padding
I've gone through a lot of similarly named questions, but have not been able to find an answer.
When a parent div has a padding and I create a child div, width 100% follows the content-box size of the parent, but height 100% seems to take the border box value of the parent. So for instance a parent with height 100px and 5px padding would create a child of height 100% with the height 100px instead of 90px.
Can anyone help me achieve the height of the parents content-box with padding?
I want to achieve a nice horizontal border, that is clipped in both ends, but is still centered.
Thank you for all and any help!
Alari
链接地址: http://www.djcxy.com/p/88484.html上一篇: 如何将php文件转换为pdf文件
下一篇: 父级填充的CSS子级高度为100%