@Foxford12

Как убрать отступы у сайта сверху справа и слева?

<!DOCTYPE html>
<html lang="ru">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <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">
    <link rel="stylesheet" href="style.css">
</head>
<body>
    <header class="header">
        <h1 class="header-title">Текст</h1>
        
    </header>
</body>
</html>


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



.header {
    position: relative;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    

    align-items: center;
    color: #e43546;
    background-color: #0c0927;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat; 
    
    
}

.header-title {
    font-family: cursive;
}


64a51964b22e3907700528.jpeg
  • Вопрос задан
  • 118 просмотров
Решения вопроса 1
@MrColdCoffee
web
у body margin:0;
Ответ написан
Комментировать
Пригласить эксперта
Ответы на вопрос 1
НЕ начинать CSS с сброса (см. комментарии):

* {
    margin: 0;
    padding: 0;
    border: 0
}


а нормализовать CSS
Ответ написан
Ваш ответ на вопрос

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

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