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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T20:23:02+00:00 2026-05-24T20:23:02+00:00

I have two divs on my page, and between the two div’s I have

  • 0

I have two divs on my page, and between the two div’s I have an image. Let me further explain…

Div 1 – This is the page’s container.
Div 2 – Holds a few lines of text
Image – Just an ordinary jpeg image I want to format.

Div 2 takes up 40% of my page starting from the page’s left border. It stretches very far down my page. So, this leaves around 60% of my page left to work with. I want for my image to be 200px wide, and 110px in height. For one reason or another, my image just appears on the bottom of my page in it’s original (pre-format) width and height. I will show you the code that I am using.

HTML:

<div id="container">

  <div id="div2">
    <p> Hi SO, I hope someone can help me with this issue! </p>
  </div>

  <img id="image1" src="test.jpg" alt="" />

</div>

CSS:

#image1{
    width:200px;
    height:100px;
    position:relative;
    float:right;
}

To recap, I want the image ‘image1’ to be aligned between the left edge of ‘div2’ and the page’s right border. So, I want it centered between the two but NOT centered on my page of course.

  • 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-24T20:23:03+00:00Added an answer on May 24, 2026 at 8:23 pm

    I don’t think you want to be working with percentages to achieve what you describe.

    This is basically what you want:

    http://jsfiddle.net/fdXHs/2/

    You can check my styles to see how I did it, if you need a more thourough explanation I will post it.

    Also you describe that nothing happens to the image, this indicates that no styles are being applied, check your css markup if theres anything that might cause not being used.

    AFTER WEBSITE EDIT

    The column that needs to hold both elements (the image and the 40% width div) isn’t wide enough to hold them both (combined width is 957px, container width is 845px). There isn’t enough room for the image so it gets bumped under the first div…

    replace prductsummary with:

    #productsummary {
        clear: both;
        background: red;
        margin: 0 220px 0 10px;
        padding: 10px 0 0 0;
    )
    

    And the image:

    #lol {
        width: 200px;
        float: right;
        margin: 10px;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a page with the following two divs: <div id=searchResults> </div> <div class=postSearchOptions
Suppose I have two DIVs on my page. <body> <div id=d1></div> <div id=d2></div> </body>
I have a large DIV of 586px width. Within this are two smaller DIVs,
I have a small page with two divs, clicked on the first div will
I have two divs on a page. a grid-container that takes a background and
In my page I have two divs called context and translation and in test1.php
On my web page I have two divs, A and B: The DOM looks
I have a simple page layout with two divs--one on top, and one on
I have an ASP.NET page that contains two div's. Both have search fields and
I have two divs. I would like to move/populate the text from div id

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.