Stage 2: Frontend Fundamentals

CSS · Lesson 04

Backgrounds and Borders

Background images, gradients, border-radius and box-shadow effects.

CSS2 min readFree lesson

Learn about an element's background, borders, shadows, and basic transition effects.
The properties covered in this lesson are essential for UI components such as buttons, cards, and banners.


1. Background

Background color

.box {
  background-color: #3498db;
  background-color: rgba(52, 152, 219, 0.5); /* semi-transparent */
}

Background image

.hero {
  background-image: url('image.jpg');
  background-size: cover;      /* fills the element completely (may be cropped) */
  background-size: contain;    /* the whole image is visible (may leave empty space) */
  background-position: center; /* centered */
  background-position: top right; /* anchored to the top right */
  background-repeat: no-repeat; /* no repetition */
  background-repeat: repeat;    /* repeat (default) */
}

Gradient background

.gradient {
  /* linear gradient */
  background: linear-gradient(to right, #667eea, #764ba2);
  background: linear-gradient(135deg, #f093fb, #f5576c);

  /* radial gradient */
  background: radial-gradient(circle, #f093fb, #f5576c);
}

Background shorthand

.hero {
  background: url('image.jpg') center/cover no-repeat;
  /* url  position/size  repeat */
}

2. Border

.box {
  border: 2px solid #333;          /* width style color */
  border-style: solid;             /* solid, dashed, dotted, double */
  border-width: 1px 2px 1px 2px;  /* top right bottom left */
  border-color: #3498db;
  border-top: 3px dashed red;      /* per-side settings */

  border-radius: 8px;              /* same for all four corners */
  border-radius: 50%;              /* makes a circle (when width == height) */
  border-radius: 10px 0 10px 0;   /* different radius per corner */
}

3. Box Shadow

.card {
  /* offset-x | offset-y | blur | color */
  box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.2);

  /* offset-x | offset-y | blur | spread | color */
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);

  /* inner shadow */
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.15);

  /* multiple shadows */
  box-shadow: 0 2px 4px rgba(0,0,0,0.1), 0 8px 16px rgba(0,0,0,0.1);
}

4. outline

Unlike border, it does not affect the size of the element.
It is mainly used for accessibility (indicating focus).

button:focus {
  outline: 3px solid #3498db;
  outline-offset: 2px; /* the gap between the outline and the element */
}

/* Removing the focus ring (be careful with accessibility) */
button:focus {
  outline: none;
}

5. opacity & cursor

.dim {
  opacity: 0.5;         /* 0 (fully transparent) to 1 (fully opaque) */
}

.clickable {
  cursor: pointer;      /* hand-shaped cursor */
  cursor: not-allowed;  /* forbidden sign */
  cursor: crosshair;    /* crosshair */
}

6. transition

transition makes CSS property changes animate smoothly.

.button {
  background-color: #3498db;
  /* property | duration | timing-function | delay */
  transition: background-color 0.3s ease;
  transition: all 0.3s ease;        /* applies to all properties */
  transition: transform 0.2s ease-out, box-shadow 0.2s ease;
}

.button:hover {
  background-color: #2980b9; /* changes smoothly over 0.3 seconds */
}

Types of timing-function:

  • ease — starts slowly, speeds up, ends slowly (default)
  • linear — constant speed
  • ease-in — starts slowly
  • ease-out — ends slowly
  • ease-in-out — starts slowly and ends slowly

Example files

Open button-styles.html in the examples/ folder to see a variety of button styles.

Assignment

Read assignment.md and build an image card gallery.

Example files

Complete, runnable files used in this lesson. Copy them into your project and experiment.

button-styles.htmlHTML
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Five Button Styles</title>
  <link rel="stylesheet" href="style.css">
</head>
<body>

  <header class="page-header">
    <h1>Button Style Showcase</h1>
    <p>Using background, border, border-radius, box-shadow, and transition</p>
  </header>

  <main class="container">

    <!-- Button section 1: default styles -->
    <section class="card">
      <h2>1. Default Buttons (Solid)</h2>
      <p class="desc">Basic buttons made up of a background color and a text color.</p>
      <div class="button-group">
        <button class="btn btn-primary">Primary</button>
        <button class="btn btn-success">Success</button>
        <button class="btn btn-danger">Danger</button>
        <button class="btn btn-warning">Warning</button>
      </div>
    </section>

    <!-- Button section 2: outline -->
    <section class="card">
      <h2>2. Outline Buttons (Outline)</h2>
      <p class="desc">Buttons with only a border and no background. The background fills in on hover.</p>
      <div class="button-group">
        <button class="btn btn-outline-primary">Primary</button>
        <button class="btn btn-outline-success">Success</button>
        <button class="btn btn-outline-danger">Danger</button>
      </div>
    </section>

    <!-- Button section 3: pill buttons -->
    <section class="card">
      <h2>3. Pill Buttons (Pill)</h2>
      <p class="desc">Pill-shaped buttons with a large border-radius.</p>
      <div class="button-group">
        <button class="btn btn-pill btn-primary">Pill Primary</button>
        <button class="btn btn-pill btn-success">Pill Success</button>
        <button class="btn btn-pill btn-outline-primary">Pill Outline</button>
      </div>
    </section>

    <!-- Button section 4: shadow buttons -->
    <section class="card">
      <h2>4. Shadow Buttons (Shadow)</h2>
      <p class="desc">Buttons given depth with box-shadow. The shadow changes on hover.</p>
      <div class="button-group">
        <button class="btn btn-shadow-blue">Shadow Blue</button>
        <button class="btn btn-shadow-green">Shadow Green</button>
        <button class="btn btn-shadow-purple">Shadow Purple</button>
      </div>
    </section>

    <!-- Button section 5: hover effects -->
    <section class="card">
      <h2>5. Various Hover Effects</h2>
      <p class="desc">Interactive buttons using transition and transform.</p>
      <div class="button-group">
        <button class="btn btn-hover-rise">Rise Up</button>
        <button class="btn btn-hover-fill">Fill Color</button>
        <button class="btn btn-hover-glow">Glow</button>
        <button class="btn btn-hover-scale">Scale Up</button>
      </div>
    </section>

    <!-- Background image section -->
    <section class="card">
      <h2>6. Background Property Demo</h2>
      <div class="bg-demos">
        <div class="bg-demo bg-gradient-1">
          <span>linear-gradient</span>
        </div>
        <div class="bg-demo bg-gradient-2">
          <span>135deg gradient</span>
        </div>
        <div class="bg-demo bg-gradient-3">
          <span>radial-gradient</span>
        </div>
      </div>
    </section>

    <!-- border-radius demo -->
    <section class="card">
      <h2>7. Various Uses of border-radius</h2>
      <div class="radius-demos">
        <div class="radius-demo radius-0">0px</div>
        <div class="radius-demo radius-8">8px</div>
        <div class="radius-demo radius-16">16px</div>
        <div class="radius-demo radius-50">50%<br>(circle)</div>
        <div class="radius-demo radius-mixed">Mixed</div>
      </div>
    </section>

  </main>

  <footer class="page-footer">
    <p>Five Button Styles Example &copy; 2025</p>
  </footer>

</body>
</html>
style.cssCSS
/* =============================================
   Five Button Styles Example
   Lesson 04: background / border / box-shadow / transition
   ============================================= */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background-color: #f0f2f5;
  color: #333;
  line-height: 1.6;
}

.page-header {
  background: linear-gradient(135deg, #667eea, #764ba2); /* gradient background */
  color: white;
  text-align: center;
  padding: 50px 20px;
}

.page-header h1 {
  font-size: 2rem;
  margin-bottom: 10px;
}

.page-header p {
  opacity: 0.85;
  font-size: 0.95rem;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 30px 20px;
}

.card {
  background: white;
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
}

.card h2 {
  font-size: 1.2rem;
  color: #2c3e50;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 2px solid #667eea; /* purple-toned border */
}

.desc {
  color: #777;
  font-size: 0.88rem;
  margin-bottom: 20px;
}

.button-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

/* =============================================
   Shared base button styles
   ============================================= */
.btn {
  padding: 10px 22px;             /* 10px top/bottom, 22px left/right padding */
  font-size: 0.9rem;
  font-weight: 600;
  border: 2px solid transparent;  /* transparent border by default */
  border-radius: 8px;             /* slightly rounded corners */
  cursor: pointer;                /* hand-shaped mouse cursor */
  font-family: inherit;           /* inherit the parent font */
  transition: all 0.25s ease;     /* 0.25s transition on all properties */
  outline: none;                  /* remove the default focus ring */
  text-align: center;
}

/* =============================================
   1. Default solid buttons
   ============================================= */
.btn-primary {
  background-color: #3498db;  /* background color */
  color: white;
}
.btn-primary:hover { background-color: #2980b9; } /* hover: darker */

.btn-success {
  background-color: #2ecc71;
  color: white;
}
.btn-success:hover { background-color: #27ae60; }

.btn-danger {
  background-color: #e74c3c;
  color: white;
}
.btn-danger:hover { background-color: #c0392b; }

.btn-warning {
  background-color: #f39c12;
  color: white;
}
.btn-warning:hover { background-color: #d68910; }

/* =============================================
   2. Outline buttons
   Use only a border with no background; the background fills in on hover
   ============================================= */
.btn-outline-primary {
  background-color: transparent;  /* no background */
  border-color: #3498db;          /* border color */
  color: #3498db;
}
.btn-outline-primary:hover {
  background-color: #3498db;     /* fill the background on hover */
  color: white;
}

.btn-outline-success {
  background-color: transparent;
  border-color: #2ecc71;
  color: #2ecc71;
}
.btn-outline-success:hover {
  background-color: #2ecc71;
  color: white;
}

.btn-outline-danger {
  background-color: transparent;
  border-color: #e74c3c;
  color: #e74c3c;
}
.btn-outline-danger:hover {
  background-color: #e74c3c;
  color: white;
}

/* =============================================
   3. Pill buttons
   A very large border-radius
   ============================================= */
.btn-pill {
  border-radius: 50px; /* very large border-radius -> pill shape */
  padding: 10px 28px;  /* wider left/right padding */
}

/* =============================================
   4. Shadow buttons
   Depth with box-shadow; the shadow changes on hover
   ============================================= */
.btn-shadow-blue {
  background-color: #3498db;
  color: white;
  border: none;
  /* offset-x | offset-y | blur | spread | color */
  box-shadow: 0 4px 14px rgba(52, 152, 219, 0.4); /* blue shadow */
}
.btn-shadow-blue:hover {
  box-shadow: 0 8px 20px rgba(52, 152, 219, 0.6); /* hover: larger shadow */
  transform: translateY(-2px);                      /* move up slightly */
}

.btn-shadow-green {
  background-color: #2ecc71;
  color: white;
  border: none;
  box-shadow: 0 4px 14px rgba(46, 204, 113, 0.4);
}
.btn-shadow-green:hover {
  box-shadow: 0 8px 20px rgba(46, 204, 113, 0.6);
  transform: translateY(-2px);
}

.btn-shadow-purple {
  background-color: #9b59b6;
  color: white;
  border: none;
  box-shadow: 0 4px 14px rgba(155, 89, 182, 0.4);
}
.btn-shadow-purple:hover {
  box-shadow: 0 8px 20px rgba(155, 89, 182, 0.6);
  transform: translateY(-2px);
}

/* =============================================
   5. Various hover effects
   ============================================= */

/* Rise up */
.btn-hover-rise {
  background-color: #667eea;
  color: white;
}
.btn-hover-rise:hover {
  transform: translateY(-4px);                      /* move up */
  box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}

/* Fill color (the background fills from left to right) */
.btn-hover-fill {
  background-color: transparent;
  border: 2px solid #e74c3c;
  color: #e74c3c;
  position: relative;
  overflow: hidden;
  z-index: 0;
}
.btn-hover-fill::before {
  content: '';
  position: absolute;
  left: -100%;                  /* start outside on the left */
  top: 0;
  width: 100%;
  height: 100%;
  background-color: #e74c3c;
  transition: left 0.3s ease;  /* move over 0.3 seconds */
  z-index: -1;
}
.btn-hover-fill:hover::before {
  left: 0;                      /* move to the right on hover */
}
.btn-hover-fill:hover {
  color: white;
}

/* Glow */
.btn-hover-glow {
  background-color: #f39c12;
  color: white;
  border: none;
}
.btn-hover-glow:hover {
  /* a glowing effect by layering multiple shadows */
  box-shadow: 0 0 10px #f39c12, 0 0 20px #f39c12, 0 0 40px #f39c12;
}

/* Scale up */
.btn-hover-scale {
  background-color: #2ecc71;
  color: white;
  border: none;
}
.btn-hover-scale:hover {
  transform: scale(1.1);  /* scale up 10% */
}

/* =============================================
   6. Background property demo
   ============================================= */
.bg-demos {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.bg-demo {
  flex: 1;
  min-width: 200px;
  height: 120px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
  text-align: center;
}

/* Linear gradient */
.bg-gradient-1 {
  background: linear-gradient(to right, #667eea, #764ba2);
}

/* 45-degree gradient */
.bg-gradient-2 {
  background: linear-gradient(135deg, #f093fb, #f5576c);
}

/* Radial gradient */
.bg-gradient-3 {
  background: radial-gradient(circle, #4facfe, #00f2fe);
}

/* =============================================
   7. border-radius demo
   ============================================= */
.radius-demos {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.radius-demo {
  width: 90px;
  height: 90px;
  background-color: #667eea;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
}

.radius-0    { border-radius: 0;    background-color: #e74c3c; }
.radius-8    { border-radius: 8px;  background-color: #e67e22; }
.radius-16   { border-radius: 16px; background-color: #f1c40f; color: #333; }
.radius-50   { border-radius: 50%;  background-color: #2ecc71; }
.radius-mixed {
  border-radius: 20px 0 20px 0; /* round only the diagonal corners */
  background-color: #9b59b6;
}

/* Footer */
.page-footer {
  background-color: #2c3e50;
  color: #aab7b8;
  text-align: center;
  padding: 20px;
  font-size: 0.85rem;
}

Assignment

Assignment — Image Card Gallery

Goal

Use background images, shadows, and hover transitions to create
an image card gallery that responds when the mouse hovers over it.


Requirements

1. Create three cards

Build each card with the following structure.

<div class="gallery">
  <div class="gallery-card">
    <div class="card-image"></div>
    <div class="card-info">
      <h3>Title</h3>
      <p>Description text</p>
    </div>
  </div>
  <!-- repeat for cards 2 and 3 -->
</div>

2. Required CSS properties

Property Requirement
background-image A different gradient background for each card (linear-gradient)
background-size Apply cover
border-radius Rounded corners on the whole card
box-shadow Set a shadow in the default state
transition Set up so it changes smoothly on hover
:hover On hover, the shadow gets stronger and the card lifts slightly

3. Card image height

  • .card-image height: 200px or more
  • Fill it with a background image (gradient)

4. Extra challenges (optional)

  • Apply overflow: hidden to the card so that border-radius applies to the image.
  • Add an effect where the card image zooms in slightly (scale) on hover.
  • Add an overlay effect using opacity.

File structure

my-folder/
├── index.html
└── style.css

Checklist

  • Each of the three cards has a different gradient background
  • box-shadow is applied
  • There is a transition effect where the shadow changes on hover
  • The card corners are rounded with border-radius
  • No inline CSS is used

Hints

.gallery {
  display: flex;
  gap: 20px;
}

.gallery-card {
  flex: 1;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.card-image {
  height: 200px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  background-size: cover;
  background-position: center;
}

If you are curious about the answer, refer to the solution folder.

Show the reference solution

Try the assignment yourself first — comparing your attempt with a working solution is where most of the learning happens.

index.htmlHTML
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Image Card Gallery — Assignment Solution</title>
  <link rel="stylesheet" href="style.css">
</head>
<body>

  <header class="page-header">
    <h1>Image Card Gallery</h1>
    <p>An interactive gallery built with backgrounds, shadows, and hover effects</p>
  </header>

  <main class="container">

    <div class="gallery">

      <!-- Card 1: ocean / blue gradient -->
      <div class="gallery-card">
        <div class="card-image card-image-ocean">
          <div class="card-overlay">
            <span class="card-tag">Nature</span>
          </div>
        </div>
        <div class="card-info">
          <h3>The Wide Blue Sea</h3>
          <p>Relaxed moments accompanied by the sound of waves. Infinite possibilities unfold beyond the horizon.</p>
          <button class="card-btn">View Details</button>
        </div>
      </div>

      <!-- Card 2: sunset / orange gradient -->
      <div class="gallery-card">
        <div class="card-image card-image-sunset">
          <div class="card-overlay">
            <span class="card-tag">Landscape</span>
          </div>
        </div>
        <div class="card-info">
          <h3>Golden Sunset</h3>
          <p>A beautiful sunset that colors the sky at the end of the day. A moment you want to pause and admire.</p>
          <button class="card-btn">View Details</button>
        </div>
      </div>

      <!-- Card 3: forest / green gradient -->
      <div class="gallery-card">
        <div class="card-image card-image-forest">
          <div class="card-overlay">
            <span class="card-tag">Nature</span>
          </div>
        </div>
        <div class="card-info">
          <h3>The Green Forest</h3>
          <p>Sunlight filtering through fresh green leaves. The calm and peace felt in nature's embrace.</p>
          <button class="card-btn">View Details</button>
        </div>
      </div>

    </div>

  </main>

  <footer class="page-footer">
    <p>Image Card Gallery &copy; 2025</p>
  </footer>

</body>
</html>
style.cssCSS
/* =============================================
   Image Card Gallery — Assignment Solution
   Lesson 04: background / border-radius / box-shadow / transition / hover
   ============================================= */

/* Global reset */
* {
  box-sizing: border-box; /* include padding/border in the width */
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background-color: #1a1a2e;   /* dark navy background */
  color: #eee;
  line-height: 1.6;
  min-height: 100vh;
}

/* Header: gradient background */
.page-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); /* purple gradient */
  text-align: center;
  padding: 60px 20px;
  color: white;
}

.page-header h1 {
  font-size: 2.2rem;
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}

.page-header p {
  opacity: 0.85;
  font-size: 1rem;
}

/* Container */
.container {
  max-width: 1100px;
  margin: 0 auto;        /* horizontally centered */
  padding: 50px 20px;
}

/* =============================================
   Gallery layout: place three cards side by side
   ============================================= */
.gallery {
  display: flex;         /* horizontal layout */
  gap: 24px;             /* spacing between cards */
  flex-wrap: wrap;       /* wrap onto a new line when the screen is narrow */
}

/* =============================================
   Gallery card
   Key: border-radius + overflow + box-shadow + transition
   ============================================= */
.gallery-card {
  flex: 1;                               /* equal width */
  min-width: 280px;                      /* minimum width */
  border-radius: 16px;                   /* rounded corners */
  overflow: hidden;                      /* keep children from spilling outside the rounded corners */
  background-color: #16213e;             /* card background (dark blue) */

  /* shadow in the default state */
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);

  /* transition: smooth changes to the properties that change on hover */
  transition: transform 0.35s ease, box-shadow 0.35s ease;

  cursor: pointer;                        /* hand-shaped mouse cursor */
}

/* Hover effect: rises up and the shadow deepens */
.gallery-card:hover {
  transform: translateY(-10px);           /* move up 10px */
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); /* stronger shadow */
}

/* =============================================
   Card image area
   background-image (gradient) + background-size + position
   ============================================= */
.card-image {
  height: 220px;                         /* image area height */
  background-size: cover;                /* fill the element completely */
  background-position: center;          /* centered */
  background-repeat: no-repeat;         /* no repetition */
  position: relative;                   /* reference point for the overlay */

  /* transition for the image zoom effect on hover */
  transition: transform 0.5s ease;
}

/* The image zooms in slightly when the card is hovered */
.gallery-card:hover .card-image {
  transform: scale(1.05);               /* scale up 5% */
}

/* Ocean: blue gradient background */
.card-image-ocean {
  background-image: linear-gradient(
    160deg,
    #0093e9 0%,
    #80d0c7 100%
  );
}

/* Sunset: orange/red gradient background */
.card-image-sunset {
  background-image: linear-gradient(
    160deg,
    #f093fb 0%,
    #f5576c 50%,
    #fda085 100%
  );
}

/* Forest: green gradient background */
.card-image-forest {
  background-image: linear-gradient(
    160deg,
    #43e97b 0%,
    #38f9d7 100%
  );
}

/* =============================================
   Card overlay: a semi-transparent layer over the image
   ============================================= */
.card-overlay {
  position: absolute;       /* absolutely positioned over the card image */
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;

  /* semi-transparent black gradient: darker toward the bottom */
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.25) 100%
  );

  display: flex;
  align-items: flex-start;  /* place the tag at the top */
  justify-content: flex-end; /* align to the right */
  padding: 14px;
}

/* Category tag */
.card-tag {
  background-color: rgba(255, 255, 255, 0.2);  /* semi-transparent white background */
  color: white;
  padding: 4px 12px;
  border-radius: 20px;                          /* pill shape */
  font-size: 0.78rem;
  font-weight: 700;
  backdrop-filter: blur(4px);                   /* blur effect */
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* =============================================
   Card information area
   ============================================= */
.card-info {
  padding: 22px;             /* inner padding */
}

/* Card title */
.card-info h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;              /* white title */
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

/* Card description */
.card-info p {
  font-size: 0.85rem;
  color: #a0aab4;           /* muted gray */
  line-height: 1.7;
  margin-bottom: 16px;
}

/* Card button */
.card-btn {
  padding: 8px 20px;
  border: 1px solid rgba(255, 255, 255, 0.2); /* semi-transparent border */
  border-radius: 6px;
  background-color: rgba(255, 255, 255, 0.08); /* semi-transparent background */
  color: #ccc;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

/* Button hover */
.card-btn:hover {
  background-color: rgba(255, 255, 255, 0.2); /* background lightens */
  color: white;
  border-color: rgba(255, 255, 255, 0.5);
}

/* =============================================
   Footer
   ============================================= */
.page-footer {
  background-color: rgba(0, 0, 0, 0.3); /* semi-transparent black background */
  color: #666;
  text-align: center;
  padding: 24px;
  font-size: 0.85rem;
}

Learn this lesson with a mentor

Work through the Build Your Homepage series on your own, or join a guided cohort at our Pitampura campus and online.

Call NowEnroll Now