Написал код. Проверял, ошибок вроде как не нашел, но проблема в том, что текст, который должен быть выравнен по центру уходит то выше, то в бок
header {
background: black no-repeat center top / cover;
height: 100vh;
}
body {
font-family: Arial, sans-serif;;
margin: 0;
padding: 0;
color: #222222;
}
div {
box-sizing: border-box;
}
.clearfix:after {
content:'';
display: block;
width: 100%;
clear: both;
}
.container {
width: 930px;
margin: 0 auto;
}
.logo {
margin-top: 76px;
float: center;
}
nav {
float: center;
margin-top: 20px;
}
.menu {
display: block;
padding: 0;
margin: 0;
margin-top: 47px;
text-align: center;
}
.menu li {
float: left;
display: block;
margin-right: 41px;
}
.menu li a {
color:#fff;
text-decoration: none;
text-transform: uppercase;
font-size: 22px;
}
h1 {
color: #fff;
font-size: 53px;
text-align: center;
}
h3 {
color: #fff;
font-size: 20px;
text-align: center;
margin: 43px;
}
.titles {
padding-top: 115px;
}
.titles_first {
font-size: 27px;
color: #fff;
text-align: center;
text-transform: uppercase;
text-decoration: none;
}
.title h1 {
text-align: center;
color: #fff;
}
.title h3 {
text-align: center;
color: #fff;
}
.btn {
display: inline-block;
background: #378dcc;
-webkit-border-radius: 10px;
-webkit-background-clip: padding-box;
border-radius: 10px;
background-clip: padding;
border-radius: 10px;
background-clip: padding-box;
font-size: 22px;
color: #fff!important;
text-decoration: none;
border-bottom: none;
outline: none;
border: none;
vertical-align: middle;
padding: 7px 20px;
text-align: center;
background: #49D4BC;
margin: 40px;
}
.services {
display: block;
padding: 0;
margin: 0;
}
.services li {
float: left;
display: block;
margin-right: 109px;
}
.servicees li p {
color:#fff;
text-decoration: none;
text-transform: uppercase;
font-size: 22px;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Elena</title>
<link rel="stylesheet" type="text/css" href="css/boom.css">
</head>
<body>
<header>
<div class="container">
<div class="heading clearfix">
<img src="img/Elena.png" alt="Elena" class="logo">
<div>
<nav>
<ul class="menu">
<li>
<a href="#">Home</a>
</li>
<li>
<a href="#">Services</a>
</li>
<li>
<a href="#">Features</a>
</li>
<li>
<a href="#">Contact</a>
</li>
</ul>
</nav>
</div>
<div class="titles">
<div class="titles_fisrt">
<h1>HAVE A GOOD DAY</h1>
<h3>JUST FOR YOU ON THEMEFOREST</h3>
</div>
</div>
<button class="btn">
<span calss="arrow"></span>
<span>GET YOUR COPY NOW</span>
</button>
</header>
<section id class="services">
<div class="container">
<ul class="services">
<li>
<p>Professionals</p>
</li>
<li>
<p>Amateurs</p>
</li>
<li>
<p>For Everyone</p>
</li>
</ul>
</div>
</section>
<footer>
</footer>
</body>
</html>
float: center
для блокаnav
, это не работает, а флоату можно задавать толькоright, left, none, inherit
htmlbook.ru/css/float. Напишите, что именно у вас выравнивается не по центру?