Top Button

Discussing Html . Code , Software , other

Moderators: macek, egami, gesf

Avalanche
New php-forum User
New php-forum User
Posts: 12
Joined: Sun May 16, 2004 1:44 pm
Contact:

Top Button

Postby Avalanche » Tue Aug 17, 2004 11:06 am

i have a few pages on a site that are long, but need to be on the same page. i wanted to put a "TOP" button on the left in the <td> i made for it. i want it to b "fixed" so it will stay in one spot as they scroll down, always having access to it. im having trouble doing this.

errr

ty

Av

User avatar
Redcircle
Moderator
Moderator
Posts: 830
Joined: Tue Jan 21, 2003 10:42 pm
Location: Michigan USA
Contact:

Postby Redcircle » Tue Aug 17, 2004 10:32 pm

4 ways to get it done.

#1 frames.... don't use them
#2 DHTML to keep the button on the screen all the time... once again don't use them
#3 periodically put a link back to the top in. Yeah you don't want to but sometimes you can't avoid it.
#4 Why have suck long pages. seperate them a little. People generally don't like really long pages. If you want to allow people to print them make a seperate printable version.

Avalanche
New php-forum User
New php-forum User
Posts: 12
Joined: Sun May 16, 2004 1:44 pm
Contact:

Postby Avalanche » Tue Aug 17, 2004 11:49 pm

well, thats not realy important, but if u want to know. im doing a site for a resaurant and its on menu pages. it has to be on one page. i know this can be done, because ive seen it b4. a little "top" image that scrolls down with you, so u can always go back to the top of the page. please, if someone knows how to do this, tell me.

thank you

Av

User avatar
swirlee
Moderator
Moderator
Posts: 2272
Joined: Sat Jul 05, 2003 1:18 pm
Location: A bunk in the back
Contact:

Postby swirlee » Wed Aug 18, 2004 6:13 am

In a perfect world you'd just use the CSS 'fixed' property. But it's not a perfect world, and 85% of your users will use IE which has completely backwards, broken CSS support.

So unfortunately, DHTML is the solution, and while I share Redcircle's bias against it, it does come in handy sometimes. Unfortunately, I don't have the JavaScript expertise for this.

I took the time to Google it for you, and the very first result was this one:

http://www.quirksmode.org/js/fixedmenu.html

Looks like a great tutorial that should be easy to follow.

Avalanche
New php-forum User
New php-forum User
Posts: 12
Joined: Sun May 16, 2004 1:44 pm
Contact:

Postby Avalanche » Wed Aug 18, 2004 10:22 am

swirlee, thanks, you always are a big help.

i did it in a different way though. i made a tinny layer on the right of my page and downloaded a DW extension, that works realy well.

takes about 30 seconds or less.

http://www.flevooware.nl/dreamweaver/ex ... sp?extID=2

thanks for your help guys


Av


Return to “HTML Basics”

Who is online

Users browsing this forum: No registered users and 0 guests