Google the hell out of this, i've seen it before but can't seem to find it now.I'm looking a simple script that will take an image or div and have it move as the page scrolls up and down. the image will probably be linked to another page.
3/22/2010 1:35:31 PM
do you want the div to animate at the page scrolls, or do you just want the div to stay in the same place on the screen?
3/22/2010 1:41:38 PM
just stay in the same placeSo if its 100 px from the top then if you scroll down, id like it to stay 100 px from the top. Nothing fancy.
3/22/2010 2:07:53 PM
In CSS, it's just "position: fixed"Though this won't work in IE6, nor other versions of IE unless you specify a doctype.
3/22/2010 2:10:44 PM
never played with fixed before, i'll try that, thnx
3/22/2010 2:22:15 PM
If you don't declare a DOCTYPE, you're not writing valid HTML anyway. ;P
3/22/2010 2:52:50 PM
doctype shmocktype. if it works in IE thats all that matters.
3/22/2010 2:53:59 PM
NOT A FAN OF Shaggy RIGHT NOW
3/22/2010 2:58:07 PM
The doctype issue comes up when you go "yo, lemme check that real quick"<html><body><div style="position: fixed; left: 50px; top: 10px">aaaaaaa</div></body></html>And then bang your head on a desk for 15 minutes when it doesn't work[Edited on March 22, 2010 at 3:26 PM. Reason : who memorizes <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"> anyway?]
3/22/2010 3:25:28 PM
More like who doesn't use an IDE that generates one for you automatically. ;P
3/22/2010 3:34:12 PM
yea lemme use an IDE thats gonna generate junk code that doesn't work in IE.
3/22/2010 3:35:50 PM
since when does IE choke on doctype declarationsbecause that's news to me[Edited on March 22, 2010 at 3:37 PM. Reason : though i guess i wouldn't be surprised]
3/22/2010 3:36:42 PM
3/22/2010 3:43:48 PM
im saying IE doesnt care about doctype, therefore doctype is optional.
3/22/2010 3:43:50 PM
Negative NancyShaggy at it again!
3/22/2010 3:47:23 PM
doctype is optional if you suck at your jobor if you don't know what you're talking about
3/22/2010 4:03:59 PM
If it works in IE, its production ready. Doctype or no.
3/22/2010 4:09:54 PM
Shaggy makes some junk
3/22/2010 4:12:09 PM
nope, that would be anything to do with firefox.
3/22/2010 4:12:52 PM
lol browsar fight!!1
3/22/2010 4:13:55 PM
although to be honest I would never dirty myself by touching unpure languages like html, css, javascript, or php.
3/22/2010 4:16:34 PM
Javascript is great, it's really funky, but it's by far the most powerful web tool out there.I haven't written straight HTML in years, why would you when there are so many other tools that can generate it for you, like JSF.
3/22/2010 6:02:18 PM
3/22/2010 6:40:45 PM
Shaggy is like the lafta of browser discussion
3/22/2010 8:35:13 PM
frontpage is to web tool as access is to database tool.
3/23/2010 11:31:44 AM
it generates 'straight HTML' for you.
3/23/2010 11:35:24 AM
so does JSF
3/23/2010 11:59:25 AM
nvm...
3/23/2010 12:16:38 PM
OIC no wait
3/23/2010 12:59:15 PM