Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Dec 3rd, 2005, 1:17 PM   #1
Dameon
Troll
 
Dameon's Avatar
 
Join Date: Apr 2005
Location: Texas
Posts: 732
Rep Power: 4 Dameon is on a distinguished road
Positioning an Element in Screen Space

I cannot manage to find how to position an element relative to the screen rather than page with CSS. Since this element will be a loading indicator, the user needs to see it regardless of what part of the page he/she is scrolled to. Surely this doesn't require Javascript.
__________________
MD5(sig) = bcef75433db02e9ad9bf81d6f7c5c270
Dameon is offline   Reply With Quote
Old Dec 3rd, 2005, 1:30 PM   #2
Lich
Professional Programmer
 
Lich's Avatar
 
Join Date: May 2005
Location: Detroit
Posts: 254
Rep Power: 4 Lich is on a distinguished road
Send a message via AIM to Lich Send a message via MSN to Lich
Quote:
Originally Posted by Dameon
I cannot manage to find how to position an element relative to the screen rather than page with CSS. Since this element will be a loading indicator, the user needs to see it regardless of what part of the page he/she is scrolled to. Surely this doesn't require Javascript.
I think it does. You can make it relative to the window with just CSS, but to make it relative to the screen I think you need JS. Then again the JS stuff isn't my specialty.
__________________
--John Cruz
Web Developer
www.cruzweb.net
Lich is offline   Reply With Quote
Old Dec 3rd, 2005, 1:59 PM   #3
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
IIRC, you need to set the CSS position attribute to "fixed" (no quotes).
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Dec 3rd, 2005, 2:26 PM   #4
Dameon
Troll
 
Dameon's Avatar
 
Join Date: Apr 2005
Location: Texas
Posts: 732
Rep Power: 4 Dameon is on a distinguished road
Thanks, Ooble. That did it.
__________________
MD5(sig) = bcef75433db02e9ad9bf81d6f7c5c270
Dameon is offline   Reply With Quote
Old Dec 3rd, 2005, 8:29 PM   #5
Agent 47
Hobbyist Programmer
 
Agent 47's Avatar
 
Join Date: Nov 2005
Posts: 122
Rep Power: 4 Agent 47 is on a distinguished road
position:fixed; will only work in real browsers, IE won't understand it.

You can accommodate IE with the following fix:
http://tagsoup.com/-dev/null-/css/fixed/

--47.
__________________
"I'm going to become rich and famous when I invent a device that allows you to stab people in the face over the internet"
Agent 47 is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 4:29 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC