Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Positioning a <span> at the upper-right corner of the web browser, but NOT the top-right of the page

Posted on 2006-10-26
3
397 Views
Last Modified: 2008-02-01
Hi experts,

I am having problems trying to position a <span> element which will say "Loading..." for an AJAX web application I am creating.

I would like to position the element at the upper-right hand corner of the web browser. That is, when the user scrolls the page down from the top of the page, the <span> element should move down as well so the user can still see it.

I've tried the following CSS code, but it places the element at the top of the web page. When the user scrolls down, the user can no longer see the "Loading..." text.

.loading {
      background-color: #042597;
      color: white;
      position: absolute;
      top: 0px;
      right: 0px;
      font-size: 12px;
      padding: 3px;
}

I made the span element have the class "loading" and gave it the text "Loading...".

Does anyone know how to accomplish this?

Thank you,
Jim
0
Comment
Question by:Jim49239
  • 2
3 Comments
 
LVL 30

Accepted Solution

by:
GrandSchtroumpf earned 125 total points
ID: 17814228
It's "position: fixed;" not "position: absolute;".
And IE6 does not support that value... i don't know if IE7 supports it.
You can either leave your span on top of the page for IE6 or use some ugly workaround.
0
 

Author Comment

by:Jim49239
ID: 17814893
Thanks. I didn't know about fixed and it lead me in the right direction to other sites.

Also, I just tried position: fixed in IE7 and it worked.
0
 
LVL 30

Expert Comment

by:GrandSchtroumpf
ID: 17815739
Thanks for the info about IE7.  =)
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
URGENT - Wordpress site missing  theme 9 53
Changing Color of Page Section 4 24
css selector 1 21
How to create a textarea which saves text in HTML 8 47
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…
In this Micro Tutorial viewers will learn how to create a CSS image sprite (In a later tutorial, viewers will learn how to use CSS and HTML to create a navigation menu using this sprite) Open a new Photoshop document with a width of (Icon width)x(N…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question