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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T20:46:53+00:00 2026-06-08T20:46:53+00:00

I have an image slider / viewer in which an absolutely positioned div containing

  • 0

I have an image slider / viewer in which an absolutely positioned div containing a bunch of images sits inside a relative div of a fixed width. The problem is that the images appear one below another inside the absolutely positioned div, instead of next to each other horizontally – even though they are given the property float:left; – How do I prevent them from wrapping (similar to how you prevent text from doing so via the no-wrap property? Can I give the absolutely positioned div a width property that encompasses all of its elements without calculating that width via javascript? Here’s code:

<div id="homeSlider" style="width:800px; position:relative;">
    <div id="homeSlides" style="position:absolute;">
        <img class="homeSlide" src="images/temp-portfolio.jpg" alt="Portfolio Item"/>
        <img class="homeSlide" src="images/temp-portfolio.jpg" alt="Portfolio Item"/>
    </div>
</div>
  • 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-06-08T20:46:55+00:00Added an answer on June 8, 2026 at 8:46 pm

    The easiest thing to do (if possible in your case) is to set the img items to display: inline-block and then set the homeSlides to have white-space: nowrap, and avoid float all together.

    See fiddle.

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

Sidebar

Related Questions

I have a folder containing images. I want to have an image slider, like
I have a list of images inside divs and a jquery ui slider, when
I have an image slider written in jQuery. I need the images to be
I have what is essentialy an image slider. I have a list of images:
I have an image slider ( NivoSlider ) which simply fades through a range
I have some sort of image-slider to show some promotions images ('promo's). I used
I have an image slideshow, which has a small DIV on top of it
I wanted to make an image slider with jquery I have 5 jpg images
I have image slider where images replace each other by timeout. I use jQuery
i have one Webpart which shows an image slider. The image slider will be

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.