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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:25:23+00:00 2026-05-27T18:25:23+00:00

I was working on a jsfiddle in an attempt to provide an answer to

  • 0

I was working on a jsfiddle in an attempt to provide an answer to this question, but ran into some unexpected behaviour.

  • I have a list of floated boxes (float:left), flowing over multiple lines.
  • If I add position:absolute to a box on the first line, it stays in its position (as expected), but only in Chrome (not FF).
  • If I add position:absolute to a box on second/third/… line, the box is positioned outside the containing div. If I add top:0 and left:0 to this box, it is positioned in the top left corner of the containing div. This happens in all browsers.

As I have no idea how to explain/fix this behaviour, I was wondering if anyone else had an idea what’s going on?

http://jsfiddle.net/hdX4w/

  • 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-27T18:25:24+00:00Added an answer on May 27, 2026 at 6:25 pm

    Based off this experiment, the elements are being positioned to the top of the wrapper as expected, but they are moving “after” the floated elements, which are all positioning to the left as they should. In other words, the absolute is making them become “last” in the list because of the float left.

    It seems to do the opposite with float: right as seen here.

    Somehow, the float positioning (in the left scenario) is making the absolute element that is “out of flow” be pushed after the floats and this is pushing the elements “outside” your box when the width is 100px. Note how with less elements the absolute just falls in behind the floats, as seen here.

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

Sidebar

Related Questions

While working on an answer to this question I created this jsfiddle . For
JSfiddle (showing the non-working code) here: http://jsfiddle.net/ts2Rr/ I have three boxes that a user
I've been working on this jsFiddle as an example of what I want. Basically
Upon invsetigating 'mu is too short's answer to this question , I noticed that
UPDATE 2 - RESOLVED: Got it working: http://jsfiddle.net/7CvZ9/12/ Had to add some classes. UPDATE
Working code in JSFIDDLE I have put the complete code in JSFiddle , the
I thought this could be achieved with the .prev() function but for some reason
Could someone explain me please why this didn't working: http://jsfiddle.net/4nzYr/ <ul> <li class=draggable>hello</li> <li
For some reason this code is working when i click on the #display div,
I have read the jsFiddle user's guide for their JSON echo feature but with

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.