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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T15:26:51+00:00 2026-05-11T15:26:51+00:00

I’d like to put a group of div elements of fixed width into a

  • 0

I’d like to put a group of div elements of fixed width into a container and have the horizontal scroll bar appeared. The div/span elements should appear in a line, left to right in the order they appear in the HTML (essentially unwrapped).

This way the horizontal scroll bar will appear and can be used instead of the vertical scroll bar for reading through the content (left to right).

I’ve tried floating them in a container and then putting a white-space: nowrap style on the container, but alas, it still seems to wrap.

Ideas?

It looked like this:

.slideContainer {     white-space: nowrap; } .slide {      width: 800px;     float: left;     display: inline; }
<div class='slideContainer'>     <div class='slide'>Some content</div>     <div class='slide'>More content</div>     <div class='slide'>Even More content!</div> </div>

UPDATE:
See site for examples, but they were wrong about not being another way – I’m sure the article is old though.

  • 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. 2026-05-11T15:26:52+00:00Added an answer on May 11, 2026 at 3:26 pm

    Try this:

    .slideContainer {     overflow-x: scroll;     white-space: nowrap; } .slide {     display: inline-block;     width: 600px;     white-space: normal; }
    <div class='slideContainer'>     <span class='slide'>Some content</span>     <span class='slide'>More content. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</span>     <span class='slide'>Even more content!</span> </div>

    Note that you can omit .slideContainer { overflow-x: scroll; } (which browsers may or may not support when you read this), and you’ll get a scrollbar on the window instead of on this container.

    The key here is display: inline-block. This has decent cross-browser support nowadays, but as usual, it’s worth testing in all target browsers to be sure.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
this is what i have right now Drawing an RSS feed into the php,
I have a French site that I want to parse, but am running into
I am trying to loop through a bunch of documents I have to put
I have some data like this: 1 2 3 4 5 9 2 6
I would like to count the length of a string with PHP. The string
For some reason, after submitting a string like this Jack’s Spindle from a text
I have just tried to save a simple *.rtf file with some websites and
I have a jquery bug and I've been looking for hours now, I can't

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.