@Foxford12

Почему фон не растягивается на все страницу?

Мне нужно чтобы в мобильной версии фон был на все страницу но он почему-то только на половину страницы в мобильной версии что делать?

index.html

!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, initial-scale=1.0">
    <link rel="stylesheet" href="style4.css">
    <title>Текст</title>
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&amp;display=swap" rel="stylesheet">
</head>
<body>
       <main>
       <article class="project">
        <div class="container">
            <h1 class="project-header">Текст</h1>
            <div class="abc">
                <img src="card4.jpg" >
            </div>
            <div class="project-deskription">
            </div>
            <a href="index.html" class="project-btn-back">← ВЕРНУТСЯ НА ГЛАВНУЮ</a>
        </div>
      

       </article>
    </main>
</body>
</html>

style.css

* {
    box-sizing: border-box;
    text-decoration: none !important;
}

body {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    color: white;

}

img {
    max-width: 100%;
}

.header {
    background-image: url("fon1.jpg");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat; 
    background-position: 100% 100%;
}

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

.project {
    padding: 0px 0px 120px 0px;
    text-align: center;
}

.project-header {
    margin: 0;
    margin-bottom: 40px;
    font-weight: bold;
    font-size: 46px;
    line-height: 1.3;

}

.project-img {
    margin-bottom: 35px;

}

.project-deskription {
    margin: 0 auto;
    max-width: 700px;
    margin-bottom: 60px;

}

.project-deskription p {
    font-size: 16px;
    line-height: 1.5;
    margin-top: 0;
    margin-bottom: 15px;

}




.project-btn-back {
    height: 60px;
    display: inline-block;
    border: 3px solid #275bec;
    border-radius: 50px;
    color: #275bec;
    padding-left: 30px;
    padding-right: 30px;
    line-height: 54px;

    font-weight: 700;
    font-size: 16px;
    text-transform: uppercase;
    transition: all 0.2s ease-in;
}

.project-btn-back:hover {
    background-color: #275bec;
    color: white;
}





.abc {
  border: 5px solid #000;
  background-color: #fff;
  position: relative;
  z-index: 1;
  padding: 5px;
}

.abc::after,
.abc::before {
  content: "";
  display: block;
  border: 5px solid #24188f;
  z-index: 20;
  position: absolute;
}

.abc::after {
  left: -5px;
  top: 10px;
  right: -5px;
  bottom: 10px;
  border-top: none;
  border-bottom: none;
}

.abc::before {
  left: 10px;
  top: -5px;
  right: 10px;
  bottom: -5px;
  border-left: none;
  border-right: none;
}

@media (max-width: 760px) {
    .project {
        padding: 40px 0 60px;
    }

    .project-header {
        font-size: 28px;
        margin-bottom: 30px;
    }

    .project-img {
        margin-bottom: 20px;
    }

    .project-deskription {
        margin-bottom: 50px;
    }

    .project-btn-back {
        padding: 0 10px;
        width: 100%;
        max-width: 320px;
    }
}
  • Вопрос задан
  • 101 просмотр
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы