I
I
Ivan2021-06-22 11:19:56
css
Ivan, 2021-06-22 11:19:56

The width of the burger is not displayed, but the height is displayed. What should I do?

<!DOCTYPE html>
<html lang="ru">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width">

  <title>Document</title>

  <link rel="stylesheet" href="file:///C:/Users/Lenovo/Desktop/zmparts/css/style.css">
</head>

<body>
  <div class="wrapper">
    <header class="header">
      <div class="container">
        <div class="header_body">

          <a href="#" class="header_logo">
            <img src="file:///C:/Users/Lenovo/Desktop/zmparts/logo/brand.png">
          </a>
          <div class="header_burger">
            <span></span>
          </div>

          <nav class="header_menu">
            <ul class="header_list">
              <li><a href="#" class="header_link"></a>Оплата</li>
              <li><a href="#" class="header_link"></a>Доставка</li>
              <li><a href="#" class="header_link"></a>О компании</li>
              <li><a href="#" class="header_link"></a>Отзывы</li>
              <li><a href="#" class="header_link"></a>Помощь</li>
              <li><a href="#" class="header_link"></a>Контакты</li>
              <li><a href="#" class="header_link"></a>Избранное</li>
              <li><a href="#" class="header_link"></a>8(800) 551-15-28</li>
            </ul>

          </nav>
        </div>
      </div>


    </header>
  </div>


body,
html {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans",
    "Helvetica Neue", sans-serif;
}

.wrapper {
  display: flex;
  min-height: 100%;
  margin: 0px auto;
  padding: 0px 15px;
}

.container {
  max-width: 1140px;
  margin: 0px auto;
  padding: 0px 15px;
}

.header {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 50%;
}
.header:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: white;
}
.header_body {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  height: 39px;
  align-items: center;
}
.header_list {
  display: flex;
  font-size: 16px;
}
.header_list li {
  list-style: none;
  margin: 0 0 0 10px;
}

.header_link {
  color: black;
  text-transform: uppercase;
  font-size: 16px;
  text-decoration: none;
}
.header_logo {
  flex: 0 0 197px;
}
.header_logo img {
  width: 100%;
  display: block;
}
.header_burger {
  display: none;
}
.header_menu {
}
@media (max-width: 767px) {
  .header_burger {
    display: block;
    position: relative;
    width: 30px;
    height: 20px;
  }
  .header_burger span {
    position: absolute;
    background-color: black;
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    top: 10px;
  }
  .header_burger:before,
  .header_burger:after {
    countent: "";
    background-color: black;
    position: absolute;
    width: 100%;
    height: 3px;
    left: 0;
  }
  .header_burger:before {
    top: 0;
  }
  .header_burger:after {
    bottom: 0;
  }
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2021-06-22
@z80b

@media (max-width: 767px) {
  .header_burger {
    display: block;
    position: relative;
    flex: 0 0 30px;
    height: 20px;
  }
....

and here is your error:
.header_burger:before,
  .header_burger:after {
    countent: "";
    background-color: black;
    position: absolute;
    width: 100%;
    height: 3px;
    left: 0;
  }

content -> content

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question