Kevin Powell - CommunityKP-C
Kevin Powell - Community16mo ago
8 replies
Faker

Does order matters when defining a class for a parent element and its child elements?

Hello guys, it's been a long time I'haven't touch HTML/CSS and I need to refresh a bit... can someone explain why when I try to change the class from the ul block to the nav block instead, nothing seems to happen please

.navigation-bar{
    display: flex;
}


<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <link rel="stylesheet" href="styles/test.css" />
    <title>Document</title>
  </head>
  <body>
    <nav>
      <ul class="navigation-bar">
        <li>Link 1</li>
        <li>Link 2</li>
        <li>Link 3</li>
        <li>Link 4</li>
        <li>Link 5</li>
      </ul>
    </nav>
  </body>
</html>
Was this page helpful?