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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T08:54:10+00:00 2026-05-29T08:54:10+00:00

I thought this would be a pretty common question to look for in Google

  • 0

I thought this would be a pretty common question to look for in Google but I can’t seem to find an answer. Any help would be greatly appreciated.

I have a web page with full size re-sizable background image. Something like this:

html
{
    background-size:contain;
    background: black url(../images/myimage.jpg);
    background-repeat:no-repeat;
    background-attachment:fixed;
    background-position:center; 
}

On the image I have a section dedicated to a z-layer DIV that contains an image and another z-layer DIV that contains some text.

When I start re-sizing the browser window my page DIVs go crazy. They actually stay static to where they are while the page and its background image is getting smaller.

How can I make sure that my DIVs that contain images, links and text are always at the correct location no matter what user’s screen resolution is or no matter how do they re-size the browser. CSS? Javascript ? JQuery ? What’s the best way to do it ?

Thank you in advance !!!

p.s. Please let me know if something isn’t clear and a sample is needed.

  • 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-29T08:54:11+00:00Added an answer on May 29, 2026 at 8:54 am

    Css is your best bet. You’ll want to set the div’s position to either fixed, absolute, or relative, depending on the case. fixed will cause the item to maintain it’s location when the user scrolls, while absolute will cause the item to scroll with the rest of the page, and will go wherever you tell it regardless of if it’s inside something else. relative gets it’s positioning relative to any parent container elements it’s inside of, or the window itself if it’s not inside another container element.

    If it’s fixed or absolute, assigning a right will maintain it’s position aligned to the right of the screen if the user re sizes the window or depending on resolution, and left, top, and bottom will all act accordingly as well. You can assign them a percentage, which will also change accordingly per resolution or resizing. Or you can assign a hard coded value in pixels, centimeters, millimeters, inches, etc… Here’s a jfiddle as code example

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

Sidebar

Related Questions

Okay at first I thought this would be pretty straightforward. But I can't think
I thought this would be something that's fairly common - but cant find it
I thought this would be pretty easy but I'm running into all sorts of
I would have thought this would be an easy one to Google, but I've
I thought this would be pretty straightforward, but I've been searching for a way
I thought this would be pretty simple, but it is proving a bit more
I thought this would be pretty simple to do but seems I must be
I thought this would be simple, but its not working .. in both the
I thought this would be fairly easy, but I'm totally baffled. I want one
I thought this code would work, but the regular expression doesn't ever match the

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.