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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T04:32:34+00:00 2026-06-13T04:32:34+00:00

I have a simple div example with two images one of which has absolute

  • 0

I have a simple div example with two images one of which has absolute positioning inside the div.

That is my HTML code:

<div style="position: relative;  display: inline; "  >             
<img src="http://www.iphones.ru/wp-content/uploads/2008/09/iphone-girl-10.jpg" / >             
<img style="position: absolute;  top: -400px; left: 100px; z-index: 10" width="32"   height="32"  src="http://4geo.ru/images/other/icon-18plus.png"/>         
</div>   

Try the example http://jsfiddle.net/yQn7W/1/ – you should see the “18+” logo on the face of the girl.
It work’s fine on both Chrome and Firefox.

But when I make few more divs one after another it seems that Firefox looses HTML flow and leaves “18+” image (which has “position: absolute;” attribute) on the page in the wrong place.

Try the example http://jsfiddle.net/yQn7W/2/

That’s how it looks in the Chrome:

https://i.stack.imgur.com/3Vhqe.jpg

And that is what Firefox displays:

https://i.stack.imgur.com/qZ4Ee.jpg

  • 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-13T04:32:35+00:00Added an answer on June 13, 2026 at 4:32 am

    This is either to width mismatch or because you haven’t properly clearfixed the container. Since there is no live version of the problem I can’t tell which is it, but if you clearfix the container and it doesn’t work, you will have to set fixed width for each div, and also set it to float and inline-block, like so:

    <div style="position: relative; float:left; display: inline-block; width:500px;" >

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

Sidebar

Related Questions

I have a simple jquery animation on a div, which is inside a div,
I have this simple piece of HTML code: <div> <input type=file name=english-file /> </div>
I have a very simple two column setup shows below. However in example one
I have this two lines of html code... <div id=slider1 data-param1=XXX data-param2=XXX></div> <script src=script.js
I have simple HTML page with svg like this: <div id=plan> <svg xmlns=http://www.w3.org/2000/svg version=1.1>
I have this simple html: <div class=wrapper> <span class=higher> [higher] <span class=lower> hello </span>
I have a simple DOM code like the following <div> <div> </div> </div> I
I have a simple nav made up of the following HTML; <div class=inner> <div
I have this simple js tabs. Here is the html : <div class=product-collateral> <div
suppose I have a simple container which have three element: <div> <span>hello world</span> <input

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.