Здравствуйте, изучаю адаптивность.
При сужении экрана от 780px, в правой стороне появляется отступ.
Далее вообще блок сужается в левой угол с текстом и параграфом. (Навигационное меню остается на месте, с ним все нормально)
HTML Код:
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<title>My Compani</title>
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/normalize.css">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,600;0,700;0,800;1,300;1,400&display=swap" rel="stylesheet">
<meta name="viewport" content="width=device-width">
<script src="https://kit.fontawesome.com/2ec54b60df.js" crossorigin="anonymous"></script>
</head>
<body>
<header>
<div class="header">
<div class="container">
<div class="menu-compani">
<div class="header-logo">
<p>MyCompany</p>
</div>
<div class="menu">
<ul class="menu-list">
<a href=""><li>Home</li></a>
<a href=""><li>About</li></a>
<a href=""><li>Services</li></a>
<a href=""><li>Portfolio</li></a>
<a href=""><li>Testimonials</li></a>
<a href=""><li>Home</li></a>
</ul>
</div>
</div>
<div class="main-company">
<h6><span>wELCOME on</span> mycompany</h6>
<p>We are a digital agency with <span>years of experience</span> and with <span>extraordinary people</span></p>
</div>
</div>
</div>
</header>
<section>
<div class="container">
<div class="about">
<div class="mac">
<img src="img/mac.png" alt="MacBook">
</div>
<div class="about-list">
<h6><span>Some words</span> about us</h6>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing<br>elit. Doloribus ex quidem maiores ullam quis, at as-<br>periores minus ad eaque maxime possimus .</p>
<ul>
<i class="fa fa-dot-circle-o" aria-hidden="true"></i><li><span>Mission </span> - We deliver uniqueness and quality</li>
<i class="fa fa-dot-circle-o" aria-hidden="true"></i><li><span>Skills</span> - Delivering fast and excellent results</li>
<i class="fa fa-dot-circle-o" aria-hidden="true"></i><li><span>Clients</span> - Satisfied clients thanks to our experience</li>
</ul>
</div>
</div>
</div>
</section>
</body>
</html>
CSS Код:
body {
font-family: 'Open Sans', sans-serif;
}
a {
text-decoration: none;
}
li {
list-style: none;
}
ul {
padding: 0;
}
.container {
max-width: 1155px;
margin: 0 auto;
padding: 0px 15px;
}
/*HEADER*/
.header {
width: 100%;
background-color: #000;
}
.menu-compani {
display: flex;
justify-content: space-between;
align-items: center;
padding-top: 57px;
}
.header-logo p{
color: #ffffff;
text-transform: uppercase;
font-size: 24px;
font-weight: 700;
display: inline;
margin: 5px 0 0 0;
}
.menu {
display: inline-block;
}
.menu-list {
display: flex;
text-transform: uppercase;
font-weight: 700;
font-size: 14px;
margin: 0;
}
.menu-list a{
color: black;
}
.menu-list a::after {
content: '';
display: block;
width: 100%;
height: 3px;
background-color: #FFAD39;
transform: scaleX(0);
transition: all .3s;
margin-top: 10px;
}
.menu-list a:hover::after {
transform: scaleX(1);
}
.menu-list a{
padding-left: 37px;
}
.main-company {
text-align: center;
margin-top: 220px;
padding-bottom: 420px;
}
.main-company h6{
font-size: 44px;
text-transform: uppercase;
font-weight: 700;
color: #FFAD39;
margin: 0;
}
.main-company h6 span {
font-weight: 300;
color: #9A9A9A;
}
.main-company p {
font-size: 20px;
color: #D5D5D5;
margin-top: 23px;
}
.main-company p span{
font-weight: 700;
}
/*SECTION*/
.about {
display: flex;
justify-content: space-between;
margin-top: 136px;
}
.about-list h6{
font-size: 34px;
text-transform: uppercase;
margin: 0;
display: inline-block;
}
.about-list h6 span {
font-weight: 400;
}
.about-list h6:after {
content: '';
display: block;
width: 100%;
height: 3px;
background-color: #FFAD39;
margin-top: 20px;
margin-bottom: 35px;
}
.about-list p {
font-size: 18px;
color: #6C6C6C;
margin: 0 0 50px 0;
line-height: 25px;
}
.about-list i {
display: inline-block;
float: left;
color: #5A5A5A;
margin-right: 10px;
margin-top: 2px;
}
.about-list li {
font-size: 18px;
font-style: italic;
color: #5A5A5A;
margin-bottom: 20px;
}
.about-list li span {
font-weight: 600;
}