Displaying images in one line inside a shorter div

Posted by nemiss on Stack Overflow See other posts from Stack Overflow or by nemiss
Published on 2010-04-03T14:25:17Z Indexed on 2010/04/03 14:33 UTC
Read the original article Hit count: 231

Filed under:
|

How can I set all images in one line and display only the first 200px of them inside the div?
Without breaking the layout, or moving images to a next line.
online demo

<div id="thumbsContainer">
   <ul>
    <li><img src="http://img214.imageshack.us/img214/6030/small3.jpg" alt="" /></li>
    <li><img src="http://img263.imageshack.us/img263/5600/small1ga.jpg" alt="" /></li>
    <li><img src="http://img638.imageshack.us/img638/3521/small4j.jpg" alt="" /></li>
    <li><img src="http://img682.imageshack.us/img682/507/small5.jpg" alt="" /></li>
    <li><img src="
http://img96.imageshack.us/img96/6118/small2o.jpg" alt="" /></li>   
   </ul>
  </div>

#thumbsContainer
{
 width:200px;
 overflow:hidden;

}
ul
{
list-style:none;
}
li
{
float:left;
}

© Stack Overflow or respective owner

Related posts about html

Related posts about css