Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7624651
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T05:01:04+00:00 2026-05-31T05:01:04+00:00

I am creating an image gallery where there are 9 list items per slide

  • 0

I am creating an image gallery where there are 9 list items per slide but with only 1 unordered list. The reason I am doing it this way so the content can be easily added into the CMS rather than having to add a new unordered list everytime they wish to add a gallery.

The way that the code is set up is:

<div class="gallery">
<span class="prv_button"><a href=""></a></span>
<div class="gallery_wrap">
<ul>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
<span class="nxt_button"><a href=""></a></span>
</div>
</div>

At the moment the unordered list does not have a width as it needs to be able to scroll to the next set of list item but at the moment there displaying inline next to each other. However I want to display underneath one another in 3’s. I have tried setting a height on the unoreder list but that does not make a different because of the width of the unordered list.

Please let me know if you require anymore information.

Thanks,

Josh

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T05:01:06+00:00Added an answer on May 31, 2026 at 5:01 am

    My first ideas to solve this are CSS selectors like:

    /* quick & dirty */
    ul li:nth-child(3n):after {
        content: '<br />';
    }
    

    OR

    ul li {
        float: left;
    }
    
    ul li:nth-child(3n+1) {
        display: block !important;
    }
    

    This should position the 1st, 4th, 7th, … list item (i.e. picture) to the very left with three pictures in a row.

    You could also try to put fixed widths so that the elements have got to obey:

    ul {
        width: 650px;
    }
    
    ul li {
        float: left;
        margin: 0 5px 5px 0;
        width: 150px;
    }
    

    Let me know when there’s something odd with the code or if I misunderstood your question, I’ll try to fix it accordingly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating a standard image gallery using FancyBox. The page shows a list of
I'm creating an scrollable image picker, but there's some info that I want to
I am creating a portfolio image gallery for my website but I'm having some
I have been creating an image gallery with jQuery, all is done. The images
I'm creating an image gallery just for fun to expand my introductory knowledge of
I am working on creating an image gallery which has thumbnails in different sizes.
Can anyone guide me with the simple javascript code for creating an image gallery
I'm making a C# image gallery for a website (I know there's many free
I just followed an MVC tutorial on creating an image Gallery, which connects the
Im creating a simple image gallery. And I mean simple: <div id=outerdiv style=width:600px;height:400px; background:#ccc;padding:50px;>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.