0

.info-bg-section {
  background: transparent url(../images/img.jpg) repeat fixed 0 0/cover;
  position: relative;
}

.info-section-colored {
  background-color: #3F3FB5;
  padding: 100px 40px;
}
<div class="info-bg-section dark-bg">
  <div class="container-fluid">
    <div class="row">
      <div class="col-md-4 info-section-colored">
        <p>Content 1</p>
        <p>Content 1</p>
        <p>Content 1</p>
        <p>Content 1</p>
        <p>Content 1</p>
      </div>
      <div class="col-md-8">
        <p>Content 2 </p>
      </div>
    </div>
  </div>
</div>

I want to add padding to this section (info-bg-section). Also I want to align vertically content in divs.

I tried to add padding to divs but it seems it isn't good idea

Sumit patel
  • 3,807
  • 9
  • 34
  • 61

1 Answers1

0

To vertically align content, you can use the vertical-align CSS property. More information on that would be found here: https://www.w3schools.com/cssref/pr_pos_vertical-align.asp.

Another idea that you may or may not have tried is using percentages for padding.

dragonFire
  • 98
  • 1
  • 9