lundi 26 avril 2021

Background color in HTML is not applied to the whole page

I made the background of the body gray . I added a picture to the body part but the back of the picture is white. but the back of the h4 sticker is gray . why the back of the picture is not gray .It happens if I manually give the basement px but I want it to do it automatically.

HTML CODES

<body class="body" style="background-color: #212325" > 
    
    <h4 class="h4"> <i style="color: yellow;" class="bi bi-upload"></i> Dikkat Çeken Yeni Diziler</h4>

    <div class="container">
      <div class="box">
      <a href="">  <img style="width: 200px; height: 300px;" src="assets/images/thePianist.jpg" alt="Shadow and Bone" ></a>
      </div>  
    </div>
   
     
</body>

CSS CODES

.h4{
    color: rgb(214, 214, 214);
    padding-bottom: 15px;
}

.body{
    padding-left: 15px;
    padding-top: 10px;
}

.container {
    width: 80%;
    padding: 80px 0;
    display: flex;
    flex-direction: row;
    float: left;
}

.box {
    width: 150px;
    height: 150px;
    background: gray;
    margin: 0px 14px;
    transition: 0.5s;
}

.box img {border-radius: 0px;}

.box:hover {
    transform: scale(1.1);
    background: black;
    z-index: 2;
}

It Look Like This :

unwanted image

I Want it look like this :

wanted




Aucun commentaire:

Enregistrer un commentaire