@EgoryKH

Почему картинка не становится на всю высоту?

Достаточно странный вопрос, но, почему картинка не становится на всю высоту ?
5e458f475df1f302763749.jpeg

<!DOCTYPE html>
<html lang="ru">
<head>
	<meta charset="UTF-8">
	<title>Кот и Пёс</title>
	<link href="https://fonts.googleapis.com/css?family=Montserrat:400,600,700|Open+Sans&display=swap&subset=cyrillic" rel="stylesheet">
	<link rel="stylesheet" href="css/main.css">
</head>
<body>
	
<header class="header">

	<div class="logo">
		<img src="img/header-logo.png" alt="Кот и Пёс">
	</div>

	<div class="container">
		<div class="header-wrap">

			<h1 class="header__title">Благотворительная помощь бездомным животным</h1>
			<p class="header__subtitle">Мы  оказываем помощь в поиске нвых хозяев домашним животным Группе предназначена для поддержки бездомных животных и животных,попавших в трудную жизненную ситуацию</p>
			<button class="header__button btn">Помочь</button>
		<a href="#" class="scroll-down"><img src="img/scroll-down.png" alt=""></a>
			
		</div>
	</div>

</header>

<div class="test">
	<h1>test</h1>
</div>

</body>
</html>


*:focus{
	outline: none;
}

body {
	margin: 0;
	padding: 0;
	font-family: 'Montserrat', sans-serif;
}

.container {
	max-width: 1170px;
	margin: 0 auto;
}

.header {
	position: relative;
	background: url(../img/header-bg.png) no-repeat center / cover;
	color: #fff;
	height: 900px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.logo {
	position: absolute;
	top: 36px;
}

.logo > img{
	width: 90px;
	height: auto;
}

.header-wrap {
	display: flex;
	justify-content: center;
	text-align: center;
	align-items: center;
	flex-direction: column;
}

.header__title {
	text-transform: uppercase;
	max-width: 700px;
	letter-spacing: 2px;
	line-height: 49px;
	margin-top: 73px;
	margin-bottom: 0;
}

.header__subtitle {
	margin: 0px;
	margin-top: 13px;
	max-width: 650px;
	font-size: 18px;
}

.btn {
	background: #e9df3c;
	font-size: 25px;
	border: 0;
}

.header__button {
	margin-top: 38px;
    border-radius: 7px;
    padding: 16px 85px;
    font-weight: 600;
}

.scroll-down {
	position: absolute;
	bottom: 10px;
}
  • Вопрос задан
  • 136 просмотров
Решения вопроса 1
profesor08
@profesor08 Куратор тега CSS
Потому что ты не выровнял по вертикали.
`background: url(..) no-repeat center center / cover`
Ответ написан
Комментировать
Пригласить эксперта
Ответы на вопрос 1
resseteverythingworks
@resseteverythingworks
Учусь делать сайты
Попробуй через size установить значение 100% 100%
Ответ написан
Комментировать
Ваш ответ на вопрос

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

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