Technical Documentation Page - Build a Technical Documentation Page

**Tell us what’s happening:
I can’t figure out how to pass the test “ Each .main-section should have an id that matches the text of its first child, having any spaces in the child’s text replaced with underscores (_) for the id’s.”

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
    <title>Cook book</title>
    <meta charset="UTF-8">
    <meta name="viewport"
content-"width=device-width, initial-scale=1.0"/>
    <link rel="stylesheet" href="styles.css">
    <nav id="navbar">
       <h1 id="head-words">COOK BOOK</h1>
     <a href="#Corn" class="nav-link"><p>Corn</p></a>
     <a href="#Pizza" class="nav-link"><p>Pizza</p></a>
     <a href="#Tires" class="nav-link"><p>Tires</p></a>
     <a href="#Swords" class="nav-link"><p>Swords</p></a>
     <a href="#Guns" class="nav-link"><p>Guns</p></a>
    <main id="main-doc">
      <section class="main-section" id="Corn">
        <p>corn is tasty, unless you don't like corn</p>
        <p>salt and pepper</p>
        <li>manditory list
          <ul>7.62 rounds</ul>
      <section class="main-section" id="Pizza"> 
       <p>Pizza is really greasy, but it's also tasty</p>
       <p>deep fry and salt</p>
       <li>mandtory list 2: electric boogalo
         <ul>snow/dirt/water mixture</ul>
         <ul>john deer lawsuit</ul>
      <section class="main-section" id="Tires">
        <p>Tires can be rubbery, but it's a good way to get minerals</p>
        <p>take off of the car in case it starts to drive away</p>
          <ul>money money money</ul>
          <ul>the irs</ul>
        <section class="main-section" id="Swords">
          <p>Swords are cool party trick</p>
          <p>eat the sheath first so you don't cut your throat</p>
          <li>listo numero 4
            <ul>bran damig</ul>
          <section class="main-section" id="Guns">
            <p>Guns, unless they're unloaded, wouldn't recomend it, not after the accident</p>
            <p>remove bullets and any tac attachments</p>
            <li>FINAL LIST
              <ul>g a m i n g</ul>
            <h2>required code</h2>
/* file: styles.css */
@media(max-width: 4096px) {
  background-color: lightgrey;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding-left: 10;
  padding-top: 6;
  padding-left: 5;
  padding-top: 100;

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.3 Safari/605.1.15

Challenge: Technical Documentation Page - Build a Technical Documentation Page

Link to the challenge:

I just tested your code above and it passed for me.

Dang, must be broken for me or something, thanks though

One thing that could be causing a problem is that both your HTML and CSS have validation errors. Some browsers may fix these automatically (I’m using FF) while others may not fix them as well and thus the browser you are using isn’t fixing all of them.

I would run your HTML through a validator and fix all the errors.

For your CSS, you are missing the closing curly brace on your media query.

P.S. I’m not guaranteeing that this will fix your issue. But it’s worth a try.

1 Like

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