The initial width of a block level element, such as div or p, is automatic.
Use Width: Auto to cancel explicitly set widths.
if you specify the width: 100%, the total width of the elements will be 100% of the block containing it plus any horizontal edge, indentation, and border.
So, the next time you find that the width of a block-level element is 100% so that it occupies the entire available width, consider whether you need to do this so that it is automatic.
Michael Unterthurner Jul 04 '13 at 11:15 2013-07-04 11:15
source share