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

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
Jim49239Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
GrandSchtroumpfConnect With a Mentor Commented:
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
 
Jim49239Author Commented:
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
 
GrandSchtroumpfCommented:
Thanks for the info about IE7.  =)
0
All Courses

From novice to tech pro — start learning today.