Menu
Coddy logo textTech

Grid-Card-Layout

Teil des Abschnitts CSS-Meisterschaft der HTML-Journey von Coddy. Lektion 42 von 43.

challenge icon

Aufgabe

Einfach

Erstelle mit CSS Grid ein einfaches 2-spaltiges Layout für die Karten.

  1. Die Karten sollten in zwei gleich großen Spalten angezeigt werden.
  2. Zwischen den Karten sollte etwas Abstand sein.

Probier es selbst

<html>
<head>
  <title>Grid Card Layout</title>
  <style> 
    
    .card {
      background-color: #0252c9;
      padding: 16px;
      border-radius: 8px;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    }
        /* Add your styles here */
        
  </style>
</head>
<body>
    <div class="card-container">
      <div class="card">
        <h3>Card 1</h3>
        <p>This is the first card with some text.</p>
      </div>
      <div class="card">
        <h3>Card 2</h3>
        <p>This is the second card with more content.</p>
      </div>
    </div>
</body>
</html>

Alle Lektionen in CSS-Meisterschaft

Übe selbstständig: Web-Playground