Starlit Daily

📚 › CSS: style and layout

6. Borders and rounded corners

border takes a width, a style such as solid, dashed or dotted, and a colour. border-radius rounds the corners; 50% on a square makes a circle.

Small rounded corners make cards look modern.

Show example

.card {
  border: 1px solid #cbd5e1;
  border-radius: 12px;
}

✍️ Your turn

Give .card a solid 1px grey border and a border-radius of 16px.

← Back to course