...

View Full Version : Fixed button clickable to top of page



Starling
12-22-2010, 12:56 PM
I have figured out how to fix a button so it stays in bottome left hand corner even if you scroll on the page, but I can not get it to activate so when it is clicked it will take you to top of page. Can anyone help please? I can get to top of page using standard <a name="....."> tag. I have enclosed

<!DOCTYPE html Public "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang = "EN" dir = ltr" xmlns = "http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv = "content-type" content = "text/xml;
charset = utf-8" />
<title>Stationary buttons</title>
</head>

<body>

<!--opening tag for top of page jump-->
<a name = "top"></a>

<!--Code fixes a bottom in the bottom left hand corner but I can not
get it to activate to send to top of page-->
<input type="button";
name = "button";
style="position:fixed;
bottom:0; left:0;"
value="Top">
<P> Trying to add a stationary button which does not move when you
scroll the page.llllllllllllllllllllllll llllllllllllllllllllll llllllllllllllllllllllllllll llllllllllllllllllllllll lllllllllllllllllllll
llllllllllllllll llllllllllllllllllll lllllllllllllllllllllllllll lllllllllllllllll lllllllllll lllll lllllllllllllllll lllllllllllllll llllllllllllll
lllllllllllllllllll lllllllllllllllllllll lllll llllll lllllllllllllllllllllllllllllllllll lllllllllllllllllll lllllllll llllllllllll llllllllllllllll
llllllllllllllllllll llllllllllllllllllllllllll lllllll l lllllllllllllllll lll lllllllllllllllllllllllll l lllllllllllllllllllllllllllllll llllllllll
lllllllllllllllllllllllllll lllllllllllllllllllllll llllllllllllllllllllll llllllllllllllll lllllllllllllllll llllllllllllllll llllllllllllllll lllllll
lllllllllllllllllllllllllllll llllllllllllllllllllllll llllllllllllllllll lllllllllllllllllllllllllllll</p>
<P> Trying to add a stationary button which does not move when you
scroll the page.llllllllllllllllllllllll llllllllllllllllllllll llllllllllllllllllllllllllll llllllllllllllllllllllll lllllllllllllllllllll
llllllllllllllll llllllllllllllllllll lllllllllllllllllllllllllll lllllllllllllllll lllllllllll lllll lllllllllllllllll lllllllllllllll llllllllllllll
lllllllllllllllllll lllllllllllllllllllll lllll llllll lllllllllllllllllllllllllllllllllll lllllllllllllllllll lllllllll llllllllllll llllllllllllllll
llllllllllllllllllll llllllllllllllllllllllllll lllllll l lllllllllllllllll lll lllllllllllllllllllllllll l lllllllllllllllllllllllllllllll llllllllll
lllllllllllllllllllllllllll lllllllllllllllllllllll llllllllllllllllllllll llllllllllllllll lllllllllllllllll llllllllllllllll llllllllllllllll lllllll
lllllllllllllllllllllllllllll llllllllllllllllllllllll llllllllllllllllll lllllllllllllllllllllllllllll</p>
<P> Trying to add a stationary button which does not move when you
scroll the page.llllllllllllllllllllllll llllllllllllllllllllll llllllllllllllllllllllllllll llllllllllllllllllllllll lllllllllllllllllllll
llllllllllllllll llllllllllllllllllll lllllllllllllllllllllllllll lllllllllllllllll lllllllllll lllll lllllllllllllllll lllllllllllllll llllllllllllll
lllllllllllllllllll lllllllllllllllllllll lllll llllll lllllllllllllllllllllllllllllllllll lllllllllllllllllll lllllllll llllllllllll llllllllllllllll
llllllllllllllllllll llllllllllllllllllllllllll lllllll l lllllllllllllllll lll lllllllllllllllllllllllll l lllllllllllllllllllllllllllllll llllllllll
lllllllllllllllllllllllllll lllllllllllllllllllllll llllllllllllllllllllll llllllllllllllll lllllllllllllllll llllllllllllllll llllllllllllllll lllllll
lllllllllllllllllllllllllllll llllllllllllllllllllllll llllllllllllllllll lllllllllllllllllllllllllllll</p>
<P> Trying to add a stationary button which does not move when you
scroll the page.llllllllllllllllllllllll llllllllllllllllllllll llllllllllllllllllllllllllll llllllllllllllllllllllll lllllllllllllllllllll
llllllllllllllll llllllllllllllllllll lllllllllllllllllllllllllll lllllllllllllllll lllllllllll lllll lllllllllllllllll lllllllllllllll llllllllllllll
lllllllllllllllllll lllllllllllllllllllll lllll llllll lllllllllllllllllllllllllllllllllll lllllllllllllllllll lllllllll llllllllllll llllllllllllllll
llllllllllllllllllll llllllllllllllllllllllllll lllllll l lllllllllllllllll lll lllllllllllllllllllllllll l lllllllllllllllllllllllllllllll llllllllll
lllllllllllllllllllllllllll lllllllllllllllllllllll llllllllllllllllllllll llllllllllllllll lllllllllllllllll llllllllllllllll llllllllllllllll lllllll
lllllllllllllllllllllllllllll llllllllllllllllllllllll llllllllllllllllll lllllllllllllllllllllllllllll</p>
<P> Trying to add a stationary button which does not move when you
scroll the page.llllllllllllllllllllllll llllllllllllllllllllll llllllllllllllllllllllllllll llllllllllllllllllllllll lllllllllllllllllllll
llllllllllllllll llllllllllllllllllll lllllllllllllllllllllllllll lllllllllllllllll lllllllllll lllll lllllllllllllllll lllllllllllllll llllllllllllll
lllllllllllllllllll lllllllllllllllllllll lllll llllll lllllllllllllllllllllllllllllllllll lllllllllllllllllll lllllllll llllllllllll llllllllllllllll
llllllllllllllllllll llllllllllllllllllllllllll lllllll l lllllllllllllllll lll lllllllllllllllllllllllll l lllllllllllllllllllllllllllllll llllllllll
lllllllllllllllllllllllllll lllllllllllllllllllllll llllllllllllllllllllll llllllllllllllll lllllllllllllllll llllllllllllllll llllllllllllllll lllllll
lllllllllllllllllllllllllllll llllllllllllllllllllllll llllllllllllllllll lllllllllllllllllllllllllllll</p>

<!--closing tag for top of page jump-->
<a href = "#top">TOP</a>

</body>
</html>

Rowsdower!
12-22-2010, 02:59 PM
In the case of wanting to get explicitly to the very top of the page all you need to do is make the href value point to "#" like so:


<a href="#">TOP</a>

You can then get rid of this anchor entirely:

<!--opening tag for top of page jump-->
<a name = "top"></a>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum