html - Block with small width and horizontal scroller -


i want make block filled large number of photos in row. width of web page small, want add horizontal scrolling.

i made here: http://jsfiddle.net/49rez/

html

<div class="wrapper">     <div class="photos">         <ul>             <li><img src="http://photos-ak.sparkpeople.com/nw/4/4/l446472527.jpg"/></li>             <li><img src="http://photos-ak.sparkpeople.com/nw/4/4/l446472527.jpg"/></li>             <li><img src="http://photos-ak.sparkpeople.com/nw/4/4/l446472527.jpg"/></li>             <li><img src="http://photos-ak.sparkpeople.com/nw/4/4/l446472527.jpg"/></li>         </ul>     </div> </div> 

css

.wrapper {     width: 80%;     margin: 10px auto; }  .wrapper {     overflow-x: scroll;     overflow-y: hidden; }  ul, li {     margin: 0;     padding: 0; }  .wrapper ul {     width: 10000px; }  ul li {     list-style: none;     float: left; } 

it works fine in chrome.

but not work in firefox, because fairy displays 10000px block lot of free space after photos.

try replace css following:

.wrapper ul {     white-space: nowrap; }  ul li {     list-style: none;     display: inline-block; } 

http://jsfiddle.net/49rez/4/


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -