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
Post a Comment