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 6319441
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T15:48:27+00:00 2026-05-24T15:48:27+00:00

I need to create a sort of cart, where I store elements created by

  • 0

I need to create a sort of cart, where I store elements created by the user.
I’ve created a simple scheme to help you understand my needs:
scheme

.buttons are two div containing an image (an arrow), where I’ll bind an onclick event to scroll elements (#scroller). The layout has fixed sizes, thus the exact length of ul#scroller (the element that will contain items and that needs to be scrolled) is 900px.
I think the size of any #scroller child <li> will be ~100px.

There’s a button (not present in the scheme) that allows the user to store in #scroller an item.

Actually when there are too many items the next will go on the bottom (beginning a new line). Instead I’d like that the new elements go ahead on the same line, but hidden (without hit #button_right).

I was thinking to do this with javascript, storing elements in an array, and keeping visible only the first 9 (x 100px), then by clicking on the arrow (let’s say, the right one) hide the first item and show the 10th.

Do you think this is a good solution?

If not, what do you suggest? What CSS rules could help me to do it?

Thanks in advance.

  • 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-24T15:48:27+00:00Added an answer on May 24, 2026 at 3:48 pm

    you need to create an extra div with a very long width, and put it inside #scroller and make #scroller have an overflow: hidden so it doesn’t show the scrollbar.

    like this:

    html:

    <div id="scroller">
        <div id="inner">
    
           (your items)
    
        </div>
    </div>
    

    css:

    #scroller {
        width: 900px;
        overflow: hidden;
    }
    
    #inner {
        width: 90000px;
    }
    

    P.S. now the items won’t go to another line but you need to code the buttons so they scroll the content depending on the number of items, depending on their width behing the same it can be more simple or not.

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

Sidebar

Related Questions

I need to create some sort of a state for a bunch of elements
Basically i just need to create an application (with sort of user access) which
I need to create a simple javascript embed type thing where the user adds
I need to create sort of a php based Excel (xslx) handling component. I
I need to create a sort of 2D array in which each one of
On my current project, I've felt the need to create a sort of simulated
I need to create a historical timeline starting from 1600's to the present day.
I need to create an XML schema that looks something like this: <xs:element name=wrapperElement>
I need to create a linked server to a DB2 database on a mainframe.
I need to create an ASP page (classic, not ASP.NET) which runs remote shell

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.