views:

152

answers:

1

I want to use overflow on a div to show all div and image, and text to but for this example i used only images.

i need a horizontal scroll, if i only use image its work well with the white-space: nowrap; css but if each images are in a div the sroll disapear and images don't show all.

Example 3 here

the first exemple work if i give a width to a wrapping all div but i can do this methode since all the div are called dynamicaly, it's mean that i can got 1 div to hundred one.

Here the code of the 3rd example

#dmcscroll2 {
  white-space: nowrap; display:
  block; width:660px;
  height:112px;
  overflow: auto;
  overflow-y: hidden;
  /*overflow :
  -moz-scrollbars-horizontal;*/
  border-style:solid;
  border-width:1px;
  border-color:#000;
}
.div-image{
  float: left;
  width: 125px;
}

how can i do for the 3rd technique without knowing the number of div with images a will get from a dynamic javascript call.

You may look at the source code to see more in detail

A: 

You can remove the float:left from .div-image CSS and add display: inline instead:

.div-image{
  display: inline;
  width: 125px;
}

That seems to work the way you wanted it to on your example website.

DzinX
Hi, i had doubt that something so simple would work but it's working thank'sIt's example 3 in the link of the main post
Gino