CSS Borders
Border Styles
The border-style property defines the type of border. You must
set this before the border will appear.
Border Width & Color
Control border thickness with border-width and color with
border-color.
Border Shorthand
The border shorthand combines width, style, and color
in one line: border: width style color;
Individual Sides
You can style each side independently using
border-top, border-right,
border-bottom, and border-left.
Border Radius (Rounded Corners)
The border-radius property creates rounded
corners. Use pixels or percentages.
border-radius: 50% on a square element
to create a perfect circle!
Summary
border-style- solid, dashed, dotted, double, etc.border-width- Thickness in px, em, etc.border-color- Any CSS color valueborder- Shorthand: width style colorborder-radius- Rounded corners- Individual sides:
border-top,border-right, etc.
Quick Quiz
Which property creates rounded corners?
Enjoying these tutorials?