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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:47:47+00:00 2026-05-27T18:47:47+00:00

Currently I’m using this: HTML: <div id=container> <img src=x.jpg id=bg /> <div id=content> <h1>Welcome

  • 0

Currently I’m using this:

HTML:

<div id="container">
  <img src="x.jpg" id="bg" />
  <div id="content">
   <h1>Welcome to my website.</h1>
   <p>Boo!</p>
  </div>
</div>

CSS:

#bg{
position:absolute;
top:0;
left:0;
height:100%;
z-index:10;
}

#container{
/* max values provided due to the max size of the image available with me(1200x800) */
max-width:1200px;
max-height:800px;
}

#content{
position:absolute;
top:10px;
left:100px;
z-index:100;
}

The advantage here is that I’m not using any Javascript at all. But then, the absolute-ly positioned elements become a nightmare when viewed on different screens.

Currently the solution I have is write and position these elements according to different screen sizes (for example, 1024×768 would have the id content’s top value as 10px whereas 1280×800 will have something like top:25px; and so on..) and store them as a separate css file so I can load the appropriate CSS during page load. I feel this is time-consuming and probably in-efficient too. Using percentage values is an option I haven’t explored yet. If you know of an elegant solution, or how the big guys at about.me do it, it would help.

Thank You.

  • 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-27T18:47:47+00:00Added an answer on May 27, 2026 at 6:47 pm

    Have you tried using background-image on the body with one of the background-size values? You could use cover or perhaps 100% 100% depending on your needs.

    Demo: http://jsfiddle.net/ThinkingStiff/UBaN6/

    body {
        background-image: url('http://thinkingstiff.com/images/matt.jpg');  
        background-size: cover;  
        background-repeat: no-repeat;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Currently, I have: <html> <div class=yes1><span><img src=img></span></div> </html> <script> var x = ='yes1' var
Currently developing an application using the newest version of symfony, obtained through PEAR. This
Currently, I am modifying a css document to make a website compatible in IE
Currently I have a class that looks like this: public class MyClass : IMyClass
Currently I am debugging the signing of an Android app. And this would be
Currently i'm having trouble using two functions in my -(void)viewDidLoad , both of these
Currently I have the following Mapping in my Controller: @RequestMapping( value = /add.html, method
Currently I am using Amazon Cloudfront to service static objects on my ASP.Net MVC3
Currently using Oracle/BEA/Plumtree ALUI Portal 6.1, and am trying to display a client's IP
Currently I am doing it like this: CGRect frameRect = myUIImageView.frame; CGPoint rectPoint =

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.