Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Horizontal Jquery Scrollbar for Multiple Rows

I need a slider with two rows, It is possible in a way, but that's not what I need. Here is the deal;

According to a tutorial I can line up multiple div's horizontally.

But if I need two rows, then it will sort items like this:

Wrong order

While what I need is this:

Correct order

(gray area is invisible)

What is the correct method to solve this problem?

The HTML of the code is just like:

<div id="main">
<div id="content-slider"></div>
<div id="content-scroll">
  <div id="content-holder">
        <div class="content-item" id="item-1">item 1</div>
        <div class="content-item" id="item-2">item 2</div>
        <div class="content-item" id="item-3">item 3</div>
        <div class="content-item" id="item-4">item 4</div>
        <div class="content-item" id="item-5">item 5</div>
        <div class="content-item" id="item-6">item 6</div>
        <div class="content-item" id="item-7">item 7</div>
        <div class="content-item" id="item-8">item 8</div>
    </div>
  </div>
</div>
</div>

It's OK to play with the CSS but I am looking for a solution with minimal interference with the HTML code.

like image 795
Koray Al Avatar asked May 19 '26 12:05

Koray Al


1 Answers

Working closely to the style of the example, try something like this: http://jsfiddle.net/GBr6e/

I have arranged the markup into columns consisting of two items, tweaking the css slightly.

Hope this helps!

like image 190
Jon Avatar answered May 22 '26 02:05

Jon



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!