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

  • Home
  • SEARCH
  • 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 8222367
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T14:15:19+00:00 2026-06-07T14:15:19+00:00

In my html page i have two divs inside a container div. The two

  • 0

In my html page i have two divs inside a container div. The two inner divs have a ‘position: aboslute’. Becuase they have to be placed at the bottom left corner of the container div.

This works great when the container div only has one inner div. But when i add a 2nd div, then the 2nd div is placed ontop of the first inner div. Which makes sense ofcourse. But now i’m trying to find a way to have them next to eachother instead of them overlapping eachother.

The inner divs are generated. So i can’t manually add an ID to them. All they have is one class name.

Example:

<div id="container">
    <div class="icon">ICON1</div>
    <div class="icon">ICON2</div>
</div>
#container {
    position: relative;
    width: 200px;
    height: 200px;
    border: 1px solid red;
}

.icon {
    position: absolute;
    bottom: 0;
    left: 0;
    border: 1px solid green;
}

Anyone have any idea how to solve this?

  • 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-07T14:15:21+00:00Added an answer on June 7, 2026 at 2:15 pm

    Use the absolute positioning on a wrapper element instead of each individual icon, then you can float or position the icons how you like within that container:

    <div id="container">
        <div class="icon-wrapper">
          <div class="icon">ICON1</div>
          <div class="icon">ICON2</div>
        </div>
    </div>
    
    #container {
        position: relative;
        width: 200px;
        height: 200px;
        border: 1px solid red;
    }
    .icon {
        border: 1px solid green;
        float:left;
    }
    .icon-wrapper {
        position: absolute;
        bottom: 0;
        left: 0;
    }
    

    Demo: http://jsfiddle.net/sYGfq/3/

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

Sidebar

Related Questions

I have two divs inside another div, and I want to position one child
In the following HTML page, I have a div, which contains two spans (
In my html I have two different datepickers, inside two different divs. I want
I have two divs on a page. a grid-container that takes a background and
I have two divs on my page, and between the two div's I have
I have two text boxes t1 and t2 in an html page. I'd like
Let's say we have two flash objects on the same html page. I want
I have an HTML page and I want to fetch the result between two
lets say i have two pages links.html & contents.php ... first page contains only
In my html page, I have one table, for every row there are two

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.