Learn CSS Flexbox by Building a Photo Gallery - Step 4

Tell us what’s happening:
Hi! This step is throwing me off.

I have tried nesting the h1 element under the element as well as under the div class “header” like so:

CSS FLEXBOX PHOTO GALLERY

  **Your code so far**
/* file: index.html */
<!DOCTYPE html>
<html>
<head>
  <h1>CSS FLEXBOX PHOTO GALLERY</h1>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Photo Gallery</title>
  <link rel="stylesheet" href="./styles.css">
</head>
<body>
  <div class="header"></div>
</body>
</html>
/* file: styles.css */

  **Your browser information:**

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36

Challenge: Learn CSS Flexbox by Building a Photo Gallery - Step 4

Link to the challenge:

You want to add the h1 inside the div you created with the class of “header”. When the instructions say:

“Inside the .header element nest an h1 element…”

They are using CSS notation to refer to the element in the HTML with the class of “header”.

2 Likes