Nikito4ka_ka
@Nikito4ka_ka

Как сделать что бы блок прилипал снизу head?

Изображение mainprivet не прилипает снизу к блоку head, а просто залезает на него (я не хочу делать просто отступ так как на разных размерах экрана отступ будет сьезжать ведь отступ в моем случае идет от самого верха сайта). Как это исправить , подскажите пожалуйста

###############HTML#####################
<!DOCTYPE html>
<html lang="ru">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="description" content="">
        <meta name="viewport" content="width=device-width, initial-scale=1">

        <!-- Place favicon.ico and apple-touch-icon.png in the root directory -->

		<link rel='stylesheet' href='css/main.css'>
		<link rel='stylesheet' href='css/normalize.min.css'>
		
		
		<title></title>
		
		<div id="video-bg">
				<video width="100%" height="auto" preload="auto" autoplay="autoplay" muted loop="loop" poster="bg/daisy-stock-poster.jpg">
					<source src="Contents/Video/Video_Header.mp4" type="video/mp4"></source>
					<source src="Contents/Video/Video_Header.webm" type="video/webm"></source>
				</video>
			</div>
			
			<ul class="nav">
				<li><a href="#" class="logo"><img src="Contents/images/logo.png" alt=""></a></li>
				<li><a href="#">О НАС</a></li>
				<li><a href="#">УСЛУГИ</a></li>
				<li><a href="#">ШКОЛА</a></li>
				<li><a href="#">ИНТЕРЕСНОЕ</a></li>
				<li><a href="#" class="logo"><img src="Contents/images/bag.png" alt=""></a></li>
			</ul>

			<div class="title_name">
				<!--текст-->
					<h1>DESIGN PRO 2021</h1>
					<div class="title_name2">
						<p>NEW CREATIVE FACTORY</p>
					</div>
			</div>
			
			
			<div class="title_design">
				<!--<div>DESIGN</div>-->
			</div>
		
		
	</head>
    <body>
        <!-- Add your site or application content here -->
		
		
		<main>
			<div class="mainprivet">
				<img src="Contents/images/mainprivet.png" width="800" height="500" alt="" />
			</div>
		</main>

        <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
        <script>window.jQuery || document.write('<script src="js/vendor/jquery-1.10.2.min.js"><\/script>')</script>
        <script src='js/main.js'></script>
    </body>
</html>

###################CSS#################
<code lang="css">


/*———————————————————————————Body / Основное ——————————————————————*/

* {
	box-sizing: border-box;
}

Body {
	background-color: #000000;
	margin: 0;
}


/*———————————————————————————————Hedeer————— ————————————————————*/

head {
	display: block;
	min-height: 100hv;
	
}

/*———————————————————————————Hedeer / Video———————————————————*/

#video-bg {
	
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    overflow: hidden;
    z-index: -2;
    background: url(bg/daisy-stock-poster.jpg) no-repeat #000000;
    background-size: cover;
	opacity:0.5;
}

#video-bg > video {
    position: absolute;
    top: 0;
    left: 0;
    min-width: 100%; 
    min-height: 100%;
    width: auto;
    height: auto;	
}

 @supports (object-fit: cover) {
     #video-bg > video {
         top: 0;
         left: 0;
         width: 100%;
         height: 100%;
         object-fit: cover;
     }
 }

/*———————————————————————————Hedeer / Navigation———————————————————*/

ul.nav {
	display: flex;
	width: 100%;
    padding: 10px;
	list-style: none;
	justify-content: center;
	background-color: rgba(0, 0, 0, 0.6);
	margin: 0;
	
}
       
.nav li { 
    float: left;
	margin-top: 6px;
	
}

.logo img {
    height: 24px;
    width: auto;
	margin-top: -6px;
	right: 0; 
	top: 0;

}
     
ul.nav a {	
    Padding: 50px;
    margin: 0 5px;
    background-color: rgba(51, 51, 51, 0);
    text-decoration: none;
    color: rgb(255, 255, 255);
    text-align: center;
}
            
ul.nav a:hover  {
    background-color: rgba(51, 51, 51, 0);
	color: #f4f4f4;
}

/*———————————————————————————Hedeer / Text———————————————————*/

.title_name {
	font-size: 60px;
	width: auto;
	position: absolute;
	left: 0;
	right: 0;
	margin: 0 auto;
	top: 50%;
	transform: translate(0, -50%);
	text-align: center;
}

.title_name2 {
	color: rgb(255, 252, 252); 
	font-family: mr_HouseBrokenRoughG, serif; 
	font-weight: normal; 
	font-style: normal; 
	font-size: 50px;
	margin-top: -80px;
	text-align: center;
}

.title_design {
	display: inline;
	color: rgb(255, 252, 252);
    font-family: mr_ArenqG, serif;
    font-weight: normal;
    font-style: normal;
	line-height: 0.5;
	font-size: 400px;
	position: absolute;
	bottom: 0px;
}



/*———————————————————————————Maine / Text———————————————————*/

.mainprivet {
	
}


/*———————————————————————————Style / Text———————————————————*/
@font-face {
    font-family: mr_ArenqG;
    src: url(Contents/Fonts/mr_ArenqG.ttf);
}

@font-face {
    font-family: mr_HouseBrokenRoughG;
    src: url(Contents/Fonts/mr_HouseBrokenRoughG.ttf);
}

h1 {
    color: rgb(255, 252, 252);
    font-family: mr_ArenqG, serif;
    font-weight: normal;
    font-style: normal;
}



</code>
  • Вопрос задан
  • 98 просмотров
Решения вопроса 1
Nikito4ka_ka
@Nikito4ka_ka Автор вопроса
Спасибо всем за помощь. Извиняюсь за свою дебильность, решение проблемы было в ошибке написания min-heigth: 100hv; , а должно быть 100vh !
Ещё раз все спасибо!
Ответ написан
Комментировать
Пригласить эксперта
Ответы на вопрос 1
@Kostik_1993
Web Developer
Вы неправильно делаете изначально. Head это не Header. Он предназначен для метаданных. Разметка страницы и ее контент должны быть только внутри тега Body
Ответ написан
Ваш ответ на вопрос

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

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