html - how can I scroll right side of grid-item class div into view? -
can please me understand going on this. i'm creating horizontal scrolling div[grid] sub grid item inside[grid-item] want execute function once right side of [grid-item] div in view odd reason can never reach right side of div scrolling.
.grid{ margin:10px 0 0 0; height:540px; width:100%; overflow-x:scroll; background:white; white-space:nowrap; } .grid-item { margin-right:10px; } .grid-sub-item { list-style-type:none; display:inline-block; margin-left:50px; padding:10px; border:1px solid gray; height:400px; width:600px; } <div class="grid"> <div class="grid-item"> <div class="grid-sub-item">1</div> <div class="grid-sub-item">2</div> <div class="grid-sub-item">3</div> </div> </div>
Comments
Post a Comment