Learn CSS Flexbox by Building a Photo Gallery - Step 4

Tell us what’s happening:
Describe your issue in detail here.

Your code so far
I’ve added a class and header inside the body, above the

. What am I missing? I closed the and the


<!-- file: index.html -->
<!DOCTYPE html>
  <head lang="en">
    <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">
    <div class="header">
/* file: styles.css */

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36 Edg/106.0.1370.42

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

Link to the challenge:

This totally changed what I was trying to say. I added a class and h1 inside the body and closed them. What’s happening?

Hey there.

You added a “div” element with the class “header”, not a “header” element with the class “header”. These are not the same.

I advise to read carefully the instructions because it does not say anywhere to use a “div”.

Also, write the contents inside your “h1” element exactly as the instruction given, because sometimes that gives you an error and won’t let you advance to the next step.

When you enter any code snippet or when you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

Thank you for this! This is why it changed my question:-)

1 Like

Thank you! I added …header class=“header” and it passed.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.