Not sure why my code isn't doing what I want

In my lessons, I can only remember using a:hover to determine the change in a button to another color when the mouse is hovering over the button. How do I get this code to do this and also become clickable as a link? I cannot figure it out even though it seems eveything to do this is already there.

<body>
  <div tabindex="1" class="overlay"></div>
  <header>
    <h1>Even Deeper Thoughts with Master Camper Cat</h1>
    <nav>
      <ul>
        <li><a href="#">Home</a></li>
        <li><a href="#">Blog</a></li>
        <li><a href="#">Training</a></li>
      </ul>
    </nav>
  </header>
  <form>
    <label for="search">Search:</label>


    <input tabindex="1" type="search" name="search" id="search">
    <input type="submit" tabindex="2" name="submit" value="Submit" id="submit">


  </form>
  <h2>Inspirational Quotes</h2>
  <blockquote>
    <p>&ldquo;There's no Theory of Evolution, just a list of creatures I've allowed to live.&rdquo;<br>
    - Chuck Norris</p>
  </blockquote>
  <blockquote>
    <p>&ldquo;Wise men say forgiveness is divine, but never pay full price for late pizza.&rdquo;<br>
    - TMNT</p>
  </blockquote>
  <footer>&copy; 2018 Camper Cat</footer>
</body>
<style>
  body {
    height: 100%;
    margin: 0 !important;
    padding: 8px;
  }
  .overlay {
    margin: -8px;
    position: absolute;
    width: 100%;
    height: 100%;
  }
  a:hover{
    color: green;
  }
</style>

The link to the challenge is https://www.freecodecamp.org/learn/responsive-web-design/applied-accessibility/use-tabindex-to-specify-the-order-of-keyboard-focus-for-several-elements

I can finish the challenge but I am trying to go above and beyond the lesson so I gain practice.

can you provide link to the challenge please

The link to the challenge is https://www.freecodecamp.org/learn/responsive-web-design/applied-accessibility/use-tabindex-to-specify-the-order-of-keyboard-focus-for-several-elements

I can finish the challenge but I am trying to go above and beyond the lesson so I gain practice.

The issue is there is an “overlay”. An invisible element, which stretches over the entire page and prevents you to click anything beneath it. Its styled with the .overlay class. Removing that element might solve your issue, or removing the overlay class, which causes it to behave like that. If you place a background color on the overlay class, you will notice it will cover the entire screen.

Thank you so much for your help…

1 Like

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