html - Horizontal scrolling boxes with text inside -


i making event listings using horizontal scrolling box have information listed in each box. how can make there isn't space between text , scroll bar?

.scrollbox {    overflow-x:scroll;    overflow-y:hidden;    -webkit-overflow-scrolling:touch;    width:750px;    white-space:nowrap;    background: white;      align-content: center;  }    .elem {    display:inline-block;    width:200px;    height:200px;    margin:10px;  font-family: montserrat;  }
  <div class="scrollbox">    <div class="elem"><p>what:</p><p>when:</p><p>where:</p><p>admission:</p>          </div>    <div class="elem"><p>what:</p><p>when:</p><p>where:</p><p>admission:</p></div>    <div class="elem"><p>what:</p><p>when:</p><p>where:</p><p>admission:</p></div>    <div class="elem"><p>what:</p><p>when:</p><p>where:</p><p>admission:</p></div>    <div class="elem">x</div>    <div class="elem">x</div>    <div class="elem">x</div>    <div class="elem">x</div>    <div class="elem">x</div>    <div class="elem">x</div>    <div class="elem">x</div>  </div>      </div>

your issue seems vertical-align. try doing:

.elem {     /* ... */     vertical-align: middle; } 

i don't know in you'll using this, can't tell whether that's precisely work you. if ends breaking something, try setting vertical-align text-bottom / text-top / bottom / top, , see if fixes it.


Comments

Popular posts from this blog

What is happening when Matlab is starting a "parallel pool"? -

angular - DownloadURL return null in below code -

php - Cannot override Laravel Spark authentication with own implementation -