Working With The CSS Box Model
Working With The CSS Box Model
• border-style: dotted;
– all four borders are dotted
• The border-style property is used in the
example above. However, it also works with
border-width and border-color.
Border - Shorthand property
• As you can see from the examples above, there are many
properties to consider when dealing with borders.
• To shorten the code, it is also possible to specify all the
individual border properties in one property. This is
called a shorthand property.
• The border property is a shorthand for the following
individual border properties:
• border-width
• border-style (required)
• border-color
For example
Output
CSS Margin
• margin: 25px;
– all four margins are 25px
CSS Padding
• padding: 25px;
– all four padding's are 25px
CSS Float
What is CSS Float?