mardi 30 juin 2020

Why my background-image isn't showing in the browser? please help me [duplicate]

enter image description here

My image isn't showing in the browser please help me. My html document is preety stright forward but the image is not showing. I have placed the image inside a folder named image. I have tried same code in another folder it worked but in this particular folder it isn't showing anything. what should i do.

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  text-decoration: none;
}

body {
  background-image: url("https://via.placeholder.com/150");
  background-position: center;
  background-size: auto;
  background-repeat: no-repeat;
}

.logopic {
  width: 4em;
}

#container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 80%;
  margin: 15px auto;
}

.list-item-ul {
  list-style: none;
  margin: 0em 2em 0em 0em;
}

.list-item-li {
  text-decoration: none;
  display: inline-block;
  background: rgb(186, 178, 117);
  padding: 0.20em 0.50em 0.20em 0.50em;
  margin: 0em 1em 0em 1em;
}

li a {
  color: white;
}
<!DOCTYPE html>
<html>

<head>
  <title>
    Responsive Web Three
  </title>
  <link rel="icon" type="image/png" href="image/logo.png">
  <link rel="stylesheet" type="text/css" href="css/style.css">
</head>

<body>
  <header id = "container" id="topheader">
    <img src="https://via.placeholder.com/150" alt="logo" class="logopic">
    <nav class="list-item-nav">
      <ul class="list-item-ul">
        <li class="list-item-li"><a href="">home</a></li>
        <li class="list-item-li"><a href="">About us</a></li>
        <li class="list-item-li"><a href="">Services</a></li>
        <li class="list-item-li"><a href="">Portofolio</a></li>
      </ul>
    </nav>
  </header>

</body>

</html>



Aucun commentaire:

Enregistrer un commentaire