Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære Challenge: Fix a Broken Layout | Boksmodellen og Afstand
CSS-Grundlæggende

Challenge: Fix a Broken Layout

Stryg for at vise menuen

Task

You are given three cards. Update the layout using the following requirements. Each card should:

  • Have a width of 200px.
  • Have 20px internal spacing.
  • Have 15px space between cards.
  • Have a border that is 2 pixels wide, with a solid style and gray color.
  • Keep the declared width unchanged even after adding padding and border.
index.html

index.html

index.css

index.css

  • Use the width property to define the element's width.
  • Use padding for internal spacing.
  • Use margin to create space between cards.
  • Use border: 2px solid gray to add the border.
  • Use box-sizing: border-box to prevent padding and border from increasing the total width.
index.html

index.html

index.css

index.css

Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 3. Kapitel 5

Spørg AI

expand

Spørg AI

ChatGPT

Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat

Sektion 3. Kapitel 5
some-alt