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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T19:31:23+00:00 2026-06-18T19:31:23+00:00

Using html/CSS I am trying to put a little div with two images inside

  • 0

Using html/CSS I am trying to put a little div with two images inside it to the bottom right outside of a large centered(with l/r margins set to auto)vertically elastic, but 400px wide div filled with lots of stuff inside. I just can’t seem to get exactly what I need.

Here is what I’m trying to get so that if the window is too wide, the green box stays right next to the red one with the empty space going to the right of both boxes. If the window isn’t wide enough, the user would have to scroll to the right to see the green box.

desired layout

I feel like I’m just missing some super easy solution to this. Float doesn’t work because that aligns the green box all the way to right and puts the empty space between the green and red. I tried a variety of ‘position’ css arrangements but had trouble with wanting the green box outside the red box.

EDIT(more details were requested):

I tried making the red box(#main) position relative, and the green(#sub) position absolute. I played around with various left:px, right:px coordinates but found that when I got it outside the red box it became invisible. I tried a variety of combinations of the position tags combined with align tags. I tried inline block(which I’m not even sure is relevant here!).

Then I was reading something about making a dummy wrapper parent div so I tried to do that and made a #wrapper which I tried to experiment with position relative/absolute but it ended up messing with the layout above the red block(really just a banner and an h1).

I’m sorry I don’t have actual code to post but every time I tried something and it didn’t work I just deleted the tags so I wouldn’t confuse myself with all this extra CSS around. I’ve been working on this little thing for a few days now. Right now my code is already little bits left over from previous attempts:

#main   {width:400px;
 margin-left: auto;
 margin-right: auto;
 padding-bottom:0px;
 overflow:hidden;}

#sub    {right:-10px;
 bottom:100px;
 float:right;}
  • 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-18T19:31:25+00:00Added an answer on June 18, 2026 at 7:31 pm

    HTML

    <div id="bigbox">
      <!-- content goes here -->
      <div id="littlebox">SomeImages</div>
    </div>
    

    CSS

    #bigbox {
      width: 900px;
      margin: 0 auto;
      position: relative;
    }
    
    #littlebox {
      width: 150px;
      position: absolute;
      bottom: 5px;
      right: -160px; // width + a 10px margin if desired
    }
    

    http://jsfiddle.net/eLT9U/1/

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

Sidebar

Related Questions

i'm trying to insert an image in a div container using css and html,
I'm trying to generate a dynamic table using CSS: <html> <head> <style> div.el1, div.el2
I am trying to put two images side by side inside a <td> (also
I have been trying to make custom radio buttons using HTML, CSS, and JavaScript.
I'm trying to create css buttons by using the following html markup: <a href=access.php
I'm learning css and trying to change background-color of all html except one div
I'm trying to change an element on an HTML page using CSS and then
I am trying to create a board game using html/css/javascript to be played on
I've created a button using HTML/CSS and a Java script. The button should direct
I'm kind of new to using HTML/CSS for real, so this maybe a stupid

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.