html - Why are my side by side scrolling divs on different levels? -


i've set system of side side scrolling divs (code below). however, whenever there different amount of content in them, appear on different levels (as seen in below picture). i'm not quite sure what's going on , have feeling has css display attribute. code included. project using bootstrap. brackets in code cms. it's automatically embedding content. here's representative jsfiddle: https://jsfiddle.net/d8jopwnr/

my html code:

        <div class="row">              <div class="col-lg-10 col-lg-offset">                 {exp:channel:entries channel="constructs" limit="1"}                 <h1>{title} <span class="header-box">{abbreviation}</span></h1>                 <br>                 <br>                 <div class="container level-box">                     <div class="row">                          {if summary!=""}                         <div class="level col-md-4">                             <h4>summary</h4>                             {summary}                               <a href="http://www.google.com">download toam° construct map</a>                         </div>                         {/if} {if level_1!=""}                         <div class="level col-md-4 col-md-offset-1 shift-margin-level">                             <h4>{title} level 1: {level_1_title}</h4>                             {level_1}                              <a href="www.google.com">download toam° construct map</a>                         </div>                         {/if} {if level_2!=""}                         <div class="level col-md-4 col-md-offset-1 shift-margin-level">                             <h4>{title} level 2: {level_2_title}</h4>                             {level_2}                              <a href="www.google.com">download toam° construct map</a>                         </div>                         {/if}                         <div class="level col-md-4 col-md-offset-1 shift-margin-level">                             <h4>{title} level 3: {level_3_title}</h4>                             {if level_3!=""}{level_3}{/if}                              <a href="www.google.com">download toam° construct map</a>                         </div>                         {if level_4!=""}                         <div class="level col-md-4 col-md-offset-1 shift-margin-level">                             <h4>{title} level 4: {level_4_title}</h4>                             {level_4}                              <a href="www.google.com">download toam° construct map</a>                         </div>                         {/if} {if level_5!=""}                         <div class="level col-md-4 col-md-offset-1 shift-margin-level">                             <h4>{title} level 5: {level_5_title}</h4>                             {level_5}                              <a href="www.google.com">download toam° construct map</a>                         </div>                         {/if} {/exp:channel:entries}                      </div>                  </div>             </div>         </div>     </div> 

my sass code (in opinion, it's easier understand regular css. if disagree, can translate css here):

$header-box-vertical-padding: 3px; $header-box-horizontal-padding: 6px; $box-height: 60%;  .header-box {     background-color: #0000ff;     color: white;     padding-top: $header-box-vertical-padding;     padding-bottom: $header-box-vertical-padding;     padding-right: $header-box-horizontal-padding;     padding-left: $header-box-horizontal-padding;     border-radius: 6px; }  .level-box > .row {   overflow-x: auto;   white-space: nowrap; } .level-box > .row > .col-md-4 {   display: inline-block;   float: none; }  .level{     height: 60%;     border-radius: 16px;     width: 200px;     overflow-x: initial;     white-space: normal;     background-color: #0000ff;     color: white;     display: inline-block;  }  .shift-margin-level{ // used adjust spacing between levels on constucts     margin-left: 5% !important; }   .map-display{     width:100%;     border: lightblue solid 1px;     border-radius: 4px;     padding: 8px;     margin-top: 10px; }  .size{     font-size: 36px; }  .vertical-center{     display:inline-block;     vertical-align:middle; }     // scrollbar stuff .level-box::-webkit-scrollbar-track {     -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);     background-color: #f5f5f5; }  .level-box::-webkit-scrollbar {     width: 6px;     background-color: #f5f5f5; }  .level-box::-webkit-scrollbar-thumb {     background-color: #000000; } 

non aligned divs

if add small line of code .col-md-4 set vertical-align: top first box align top of container rest.

.level-box > .row > .col-md-4 {    vertical-align: top;    display: inline-block;    float: none; } 

Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -