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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T14:57:01+00:00 2026-05-11T14:57:01+00:00

I noticed an unusual issue today while throwing together a quick under construction type

  • 0

I noticed an unusual issue today while throwing together a quick ‘under construction’ type page where I’m moving text onto an image using relative positioning. (This page was ‘inspired’ by SO’s offline page, if you care)

<html>   <head>     <title>Bronco Marching Band</title>   </head>   <body style='background-color: #888;'>     <div style='text-align: center;'>       <img src='standby.jpg' width='799px' height='600px' alt='Please Stand By'        title='The Bronco Band website is down for a major upgrade. Please check back later.'         style='width: 620px; height: 465px; opacity: 0.8;' />       <div style='color: #C69C6D; font-size: 397%; font-weight: bold; font-family: sans, arial, helvetica; position: relative; top: -300px; left: 0px;'>         PLEASE STAND BY       </div>     </div>   </body> </html> 

It seems to be that the area where the relatively positioned div used to be is still taking up space. i.e. it leaves whitespace below the image where the div would be if it wasn’t positioned.

Is there any way around this?

  • 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. 2026-05-11T14:57:02+00:00Added an answer on May 11, 2026 at 2:57 pm

    Relative-positioned elements still take up space. You actually want an absolutely-positioned element… you just want it to be positioned absolutely relative to the container!

    <div style='text-align: center;position:relative; zoom: 1;'>    <img src='standby.jpg' width='799px' height='600px' alt='Please Stand By' title='The Bronco Band website is down for a major upgrade. Please check back later.' style='width: 620px; height: 465px; opacity: 0.8;' />    <div style='color: #C69C6D; font-size: 397%; font-weight: bold; font-family: sans, arial, helvetica; position: absolute; top: 200px; left: 0px; width: 100%; text-align:center'>      PLEASE STAND BY    </div>  </div>  

    Key changes:

    • Container div has position: relative style set
    • Child div has position: absolute style set, causing it to be positioned at absolute coordinates within the parent.
    • I position relative to the top of the parent, and make the positioned div full-width to allow text-align: center to work.

    Edit: In order for IE6 to position correctly, I’ve used a hack to force layout for the container DIV: the zoom: 1 style. If you don’t need to support IE6, you can omit this.

    Tested in: FF3, IE6, Chrome1, Chromium2

    Demo: http://jsbin.com/uqisa

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

Sidebar

Ask A Question

Stats

  • Questions 109k
  • Answers 109k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer That method takes varargs. There's not a really easy way… May 11, 2026 at 9:27 pm
  • Editorial Team
    Editorial Team added an answer dom4j or jdom are probably the most elegant, you can… May 11, 2026 at 9:27 pm
  • Editorial Team
    Editorial Team added an answer NIP is the Next Instruction Pointer or more generically the… May 11, 2026 at 9:27 pm

Related Questions

In using Hibernate's JPA implementation, I noticed an interesting optimization behavior. Within the same
I just had a laptop crash (spilled water on it). I copied my working
In opening up the .xap file that is generated as output from a Silverlight
I'm using Visual Studio 2008 Team System with SP1, and I've noticed an annoying

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.