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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T20:51:18+00:00 2026-06-04T20:51:18+00:00

In my intro page I have a really big image in height and width

  • 0

In my intro page I have a really big image in height and width to fit all the resolutions (more than 4000px in width) and I set it as below:

#source-image {
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

Then, I added some text over that image with these style properties:

.description {
    position:absolute;
    top:510px;  
    left:23px;
    width:340px
}

And it looks properly (and as I want it to be shown) on my 15.6 inch laptop with 1366×768 resolution.

enter image description here

However when my roommate saw it on his high resolution monitor the description was not on the “right” position. Of course, I understand why this is happening.

enter image description here

My question is how can I keep dynamically the proper position of the description text in all resolutions?
Thank you very much.

  • 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-04T20:51:19+00:00Added an answer on June 4, 2026 at 8:51 pm

    Set the distance from the bottom, not from the top. Or set it in %.

    EDIT: I’ve adapted one of my experiments into an example: http://dabblet.com/gist/2787061
    The position of the description is set relative to the bottom and the left of the image container (the image is filling its entire container).

    In the first case, the distances to the left and the bottom of the image container are fixed, in px.

    In the second case, they are in % and change on resizing the browser window.

    Basically, the rules that do the trick are

    figcaption {
        bottom: 5px;
        left: 23px;
            /* more rules here */
    }
    

    in the fist case (fixed distances, in px) and

    figcaption.perc {
        left: 10%;
        bottom: 17%;
    }
    

    in the second case (percentage).

    Also, please note that you don’t need position: absolute or to set the top and the left properties for the image.
    However, you do need to set position:relative on the parent of the description box.


    For the image to fill the screen horizontally, you need to have margin:0; and padding:0; on the body element and width: 100%; and margin: 0; on the figure element. I’ve edited my example to reflect these changes http://dabblet.com/gist/2787061

    For the image to fill the screen both horizontally and vertically, the easiest way is to not even use an img tag, but simply set the image as a background image for the body and set the height for both the html and the body elements to 100% – example http://dabblet.com/gist/2792929

    Be careful for two reasons: one, this will really distort the image and can make it look ugly when resizing the browser window and two, if you need some content below the image you will need to give the the outer element position: absolute and set its top: 100%. Both these two aspects can be seen in the example I’ve linked to. You can simply remove the content below the image if you don’t need it.

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

Sidebar

Related Questions

I have written an GWT app and a static Intro page that introduces the
I have a page with lots of big number values. Millions and billions of
I have fairly large set of data returned via AJAX from a page. This
I have a page that loads an external HTML page into an iFrame. There
I have downloaded the web page into an html file. I am wondering what's
I have a web page into a html iframe, the web page has a
I have a textarea within an HTML page into which my users paste content.
I have a datalist inside a usercontrol that gets loaded into a page where
I am loading content into a page with ajax that will have live click
Yes, I know you have to embed the google analytics javascript into your page.

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.