matt 0

I have a list of images in a simple scroller that I would like to put an even distance between automatically. Here is my code:

    <div id="mylist" style="  height: 481px; width: 700px; overflow-x: auto; whitespace:no-wrap;"">
<div id="inner" style="width: 7500px;  margin: auto">

        <img src="carousel_img/1/1.jpg" height="450" />
    <img src="carousel_img/1/2.jpg" height="450" />
        <img src="carousel_img/1/3.jpg" height="450" />
        <img src="carousel_img/1/4.jpg" height="450" />
        <img src="carousel_img/1/5.jpg" height="450" />
        <img src="carousel_img/1/6.jpg" height="450" />
        <img src="carousel_img/1/7.jpg" height="450" />
        <img src="carousel_img/1/8.jpg" height="450" />
        <img src="carousel_img/1/9.jpg" height="450" />
    <img src="carousel_img/1/10.jpg" height="450" />
        <img src="carousel_img/1/0.jpg" height="450" />
        <img src="carousel_img/1/11.jpg" height="450" />


any thing would help- Thanks

  • Are you doing something like a sliding box or carousel with jQuery? Gary Hepting over 7 years ago

2 answers

flavicius 118

I'm not sure if I understood your question, but u can try this.

Every image put into DIV. Set a class for this DIVs and define WIDTH in percentage for them (whole width/count of the divs). Set text-align: center; and see what happend :)

Answered over 7 years ago by flavicius

Just use position: relative; left: 5px.

in the css it would be

position: relative;
left: 5px;
Answered over 7 years ago by canyonchase1