Home > database >  Bootstrap Row hits breakpoint too late
Bootstrap Row hits breakpoint too late

Time:04-26

With the current code below, the row does not change vertically until the dimensions 234 x 668

.contbg {
  background-color: #FF0000;
}

.rowbg {
  background-color: #FFFF00;
}

.colbg {
  background-color: #00ff00;
}
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
  <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
</head>


<a>TEST</a>
<div >
  <div >
    <div >
      <div >
        <div >
          TTITLE
        </div>
        <div >
          <img  src="https://source.unsplash.com/collection/190728/1500x900" alt="">
        </div>
      </div>
    </div>
    <div >
      <div >
        <div >
          TTITLE
        </div>
        <div >
          <img  src="https://source.unsplash.com/collection/190728/1500x900" alt="">
        </div>
      </div>
    </div>
    <div >
      <div >
        <div >
          TTITLE
        </div>
        <div >
          <img  src="https://source.unsplash.com/collection/190728/1500x900" alt="">
        </div>
      </div>
    </div>
  </div>
</div>

I'm trying to make it rearrange once it hits under 450w but when I add row-sm to the first row

    <a>TEST</a>
    <div >
      <div >
        <div >

it makes the entire container vertical instead of horizontal right from the start. How can I fix this?

CodePudding user response:

I was missing col-sm-4 added to every column

.contbg {
  background-color: #FF0000;
}

.rowbg {
  background-color: #FFFF00;
}

.colbg {
  background-color: #00ff00;
}
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
  <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
</head>


<a>TEST</a>
<div >
  <div >
    <div >
      <div >
        <div >
          TTITLE
        </div>
        <div >
          <img  src="https://source.unsplash.com/collection/190728/1500x900" alt="">
        </div>
      </div>
    </div>
    <div >
      <div >
        <div >
          TTITLE
        </div>
        <div >
          <img  src="https://source.unsplash.com/collection/190728/1500x900" alt="">
        </div>
      </div>
    </div>

  • Related