T
T
TaskynYertay2015-05-08 19:34:20
css
TaskynYertay, 2015-05-08 19:34:20

How to remove padding at the top (Bootstrap)?

I practice layout using Bootstrap, I created 2 columns, but the second one has an indent from above, how to remove it?545e7448ba1b4a92b943f99a637f478f.png

<header>
    <div class="container-fluid">
      
      <div class="row">
        <div class="col-md-1">
          <img src="img/logo.png" height="101" width="141" alt="logo">
        </div>
        <div class="col-md-4 header">
          <h1><span style="color: #5095c2;">Лучшие прогнозы</span> 
          от лучших прогнозистов</h1>
        </div>
      </div>
    </div>
  </header>

Styles:
body {
font-family: sans-serif;
font-size: 16px;
min-width: 320px
position: relative;
line-height: 1.6;
font-family: "RobotoRegular", sans-serif;
overflow-x: hidden;
padding: 72px 40px 52px;
}
header{
position: relative;
}
header .col-md-4 h1{
font-size: 54px;
font-weight: bold;
}

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
AlexMold, 2015-05-08
@TaskynYertay

write
h1{
line-height: 54px;
}
since h1's font-size is 54px and body sets its padding to 1.6em, 54px*1.6=86.4px
that's where your padding comes from

D
Dmitry Bay, 2015-05-08
@kawabanga

this is not the indent of the div but of the h1!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question