my navbar code for a simple navbar does not seem to be working

Viewed 24

my HTML code:

<head>
  <link href="<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x" crossorigin="anonymous"">
</head>
<section class="standard-sidebar">
  <h1>Food Web</h1>
<nav id="standard" class="single-level nav" role="navigation">
    <ul>
      <li><a href="#">1</a></li>
      <li><a href="#">2</a></li>
      <li><a href="#">3</a></li>
      <li><a href="#">4</a></li>
      <li><a href="#">5</a></li>
    </ul>
    </nav>
</section>

My CSS:

.single-level nav{
  display: flex;
  justify-content: space between;
}

This does not seem to be working at all.

1 Answers

You need to apply your style to ul element:

.single-level ul{ display: flex; justify-content: space between; }
Related