H
H
HellBlade2018-03-01 16:04:13
Flexbox
HellBlade, 2018-03-01 16:04:13

Why doesn't the justify-content property work?

I can't figure out why the Justify-content property isn't working. The menu needs to expand.
Code example:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <link rel="stylesheet" type="text/css" href="CSS/reset.css">
  <link rel="stylesheet" type="text/css" href="style.css">
  <title>Document</title>
</head>
<body>
  <header>
    <div class="container">
      <div class="logo-menu">
        <div class="logo">
          <span>Leo/-</span>
        </div>
        <nav>
          <ul>
            <li><a href="#">Solutions</a></li>
            <li><a href="#">Products</a></li>
            <li><a href="#">Portfolio</a></li>
            <li><a href="#">Contact</a></li>
          </ul>
        </nav>
      </div>
        <img src="img/icon-coffee.png">
        <div class="text-header"><code>
          <span>Introducing</span>
          <span>Something hot......</span>
          <a href="#">Try Demo</a>
        </div>
      </div>
  </header>
</body>
</html></code>
<code>
.container{
  max-width: 1024px;
  width: 100%;
  margin: 0 auto;
  font-family: roboto, arial;
  font-size: 16px;
}
header{
  background: url(img/bg-header.jpg) no-repeat center top / cover;
  height: 500px;
}
.logo{
  font-size: 119px;
  color: #cdd0d2;
  flex: 1 1 auto;
}
.logo-menu{
  display: flex;
  align-items: center;
}
nav ul{
  display: flex;
  flex: 1 1 auto;
  justify-content: space-around;
}
</code>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
ElijahTr, 2018-03-01
@HellBlade

nav {
  flex: 1 1 auto;
}

instead of nav ul

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question