Can’t understand the need for width for AUTO!

I’m not able to understand the explanation given for “The box model exercise 10. Auto”, especially the part about needing to set the width.Can anyone explain this to me using some diagrams because I’m not able to visualize what it means for the width to be set to the full width of the containing element when no width is set. I’ll appreciate the help.

Block elements default to width: auto when not declared in the ruleset. That means if the parent element is the full width of the window (which it is by default) then that element will also be the full width, also.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.