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
396 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

ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
CSS z-index issue 3 32
Change javascript css 1 30
Target h5 of a div 3 17
Sort Order Icons on HTML Table 3 24
When applying CSS to your HTML, there are many different ways to select which element(s) the CSS applies to.  Some of these selectors are more commonly known and used than others - Here are the more common ones: #X - Matches an ID of X .X - Matche…
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

810 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