Looks Change Everything!
The display property affects how an object in an HTML Document can appear.
Certain objects like 'div' have a default block display property.
See as
The div does not wrap with the text? Say the 'div' is 'in-line'. Then fits in
with the text.
Another attribute that can be modified is its widtd and margin.
This div has a width of 300 pixels with automatic margining. That means that how much
between this 'div' from the rest is automatically adjusted. Since the width is manually set it
doesn't stretch across this page.
If I want to make this 'div' mobile-friendly I would use 'max-width' so it could
adjust accordingly.
It's more than width that can be changed. Height ,margin, border, and padding, the amount of space
around the text and objects inside the modified object. All are part of the box model of the parts of
an html object that can be changed.
Back To Index.