S
S
Sergey Vasenin2017-10-15 18:23:48
css
Sergey Vasenin, 2017-10-15 18:23:48

How to remove padding from boostrap 3?

There is a hat with a picture, I want to press it to the right side, but an incomprehensible padding appeared

.row div
{
  background-color: aliceblue;
  position: relative;
  background-color: red;
  height: 700px;
}

.bg_left
{
  background-image: url(img/left.png);
  height: 800px;
  width: auto;
  background-size:cover;
  background-repeat: no-repeat;
  position: absolute;
  top: 0;
  right: 0;
}

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
    <title>Bootstrap 101 Template</title>

    <!-- Bootstrap -->
    <link href="css/bootstrap.css" rel="stylesheet">
    <link href="index.css" rel='stylesheet'>

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
  </head>
  <body>
  <div class="container-fluid">
   <div class="row">
   <div class="col-lg-6"></div>
   <div class="col-lg-6"><div class="bg_left"></div></div>
    </div>
    </div>

    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="js/bootstrap.js"></script>
  </body>
</html>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey delphinpro, 2017-10-15
@emin313

.bg_left
{
  background-image: url(img/left.png);
  height: 800px;
  width: auto;
  background-size:cover;
  background-repeat: no-repeat;
  position: absolute;
  top: 0;
  right: ($grid-gutter-width / -2); // <--
}

Will you have a background image?
Do better like this https://jsfiddle.net/w2ex7vd9/1/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question