Forum Moderators: open

Message Too Old, No Replies

Help with XHTML

Floating Image

         

sacrelage

9:08 pm on Jan 30, 2005 (gmt 0)

10+ Year Member



Help please. I would like to know if anyone knows to create a dynamically floating image using just plain HTML?

Ex: The image has to be right aligned. And if the page is scrolled down, the image also has to come down, same holds true when the page is scrolled up.

Would apreciate any help regarding this. Got to submit this by Tuesday.

Thanks.

Purple Martin

1:27 am on Jan 31, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This is outside the scope of HTML. You need JavaScript to do it, and as I'm sure you know not everyone surfs with JavaScript enabled. It is also theoretically possible to fix a background image with CSS, however browser support varies and of course foreground text will appear in front.

tedster

5:47 am on Jan 31, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If I understand you correctly, in theory this can be done with CSS by using position:fixed

But there's a downside - IE on Windows does not support it. However Mozilla and Opera, plus IE or Safari all do. And someday, maybe, IE on Windows.

sacrelage

6:06 am on Jan 31, 2005 (gmt 0)

10+ Year Member



Yes, I presumed the same as well. However, a friend of mine whos doing his course in web designing was given this assignment.

Well, hes already late for his submission and he told me that his classmates did get to do the same using plain HTML.

This baffled me coz as far as I know plain HTML cannot do something like that. The possible solution would be either CSS or Javascript.

I offered to make a JS code and then call it from the HTML, but he told me that it has to be designed in just plain HTML.

He did tell me that they should use XHTML. Any guesses?

Thanks.

tedster

7:13 am on Jan 31, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



My guess is that the teacher assumes inline style attributes are "plain" HTML.