@Sicker

Bootstrap отступ слева и справа?

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

<!doctype html>
<html lang="en">
  <head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    
    <!-- Bootstrap CSS -->
    
   <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
   <link rel="stylesheet" href="my.css">
    <title>Hello, world!</title>
  </head>
  <body>
    

   <div class="header-site">
    <div class="container-fluid">
        <div class="row">
      <div class="col-sm-12 col-md-12 col-lg-12 text-center" >
    <h1>Header</h1> 
    </div>
</div>  
   </div>   
   </div>
   
   <div class="site-navigator-bar">
        <div class="container-fluid">
            <div class="row">
              <div class="col-sm-12 col-md-12 col-lg-12">
                  <nav class="navbar navbar-expand-lg navbar-light bg-light">
  <a class="navbar-brand" href="#">Menu</a>
  <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
    <span class="navbar-toggler-icon"></span>
  </button>
  <div class="collapse navbar-collapse" id="navbarNav">
    <ul class="navbar-nav">
      <li class="nav-item active">
        <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
      </li>
      <li class="nav-item">
        <a class="nav-link" href="#">Randombutton</a>
    
    </ul>
  </div>
</nav>
   </div>
   
</div>
</div>
</div>
   <div class="contentt">
   <div class="container-fluid">
<div class="row">
    <div class="col-lg-2 col-md-2 col-sm-2 new"> 
            <div class="list-group">
                    <a href="#" class="list-group-item list-group-item-action">
                      menu
                    </a>
                    <a href="#" class="list-group-item list-group-item-action">menu1</a>
                    <a href="#" class="list-group-item list-group-item-action">menu2</a>
                    <a href="#" class="list-group-item list-group-item-action">menu3</a>
                    <a href="#" class="list-group-item list-group-item-action">menu4</a>
                  </div>
    </div>
    <div class="col-lg-10 col-md-10 col-sm-10 new2">  
         
    </div>
</div>
</div>
</div>




    <!-- Optional JavaScript -->
    <!-- jQuery first, then Popper.js, then Bootstrap JS -->
    <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
  </body>
</html>


body{
    font-family: Arial, Helvetica, sans-serif;
    background-color: whitesmoke    ;
    font-size: 14px;
    margin: 0 auto;
    padding: 0;
    color:#333;
    
}


.header-site{
    background-color: lightseagreen;
    height:150px;
    min-width: 320px;
    max-width: 1680px;
    margin: 0 auto;
    box-shadow: 0 2px 5px black;
}

.site-navigator-bar{
    background-color: azure;
    min-width: 320px;
    max-width: 1680px;
    margin: 0 auto;
    box-shadow: 0 2px 5px black;
}
.contentt{
    background-color:grey;
    margin-bottom: 100px;
    height:500px;
    margin: 0 auto; 
    min-width: 320px;
    max-width: 1680px;
    margin-top: 4px;
    box-shadow: 0 2px 5px black;
}

.new{
    background-color: azure; 
    height: 500px;

}
.new2{
    background-color: grey; 
    height: 500px;
    

}
.list-group{
 width:500px;
 margin-right:1 00px;
}
  • Вопрос задан
  • 2680 просмотров
Решения вопроса 1
@adrenalinruslan
Везде где тебе нужно убрать отступы пиши вот так:

/* ---- [ Например ] ---- */

.container {
    margin: 0;
    padding: 0;
}
Ответ написан
Пригласить эксперта
Ваш ответ на вопрос

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

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