Forum Moderators: open

Message Too Old, No Replies

Internal page links with button

         

Kavkan

2:29 pm on Aug 6, 2008 (gmt 0)

10+ Year Member



I was wondering, is it possible to link to different parts of the same page by using a button instead of a text link?

D_Blackwell

8:29 pm on Aug 6, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Sure. You are really just talking about linking an image and using a fragment identifier for another location on the same page. CSS solution option.

<html>
<head>
<style>
img.button-link {
width: 75px; height: 40px; border: none;
}
</style>
</head>
<body>
<div class="button-link">
<a href="#another-area" title="Whatever.">
<img src="aaa.jpg" class="button-link" alt="" title="" />
</a>
</div>
<!--Another location of the page-->
<div style="margin: 40em 2em; height: 40em; border: .1em solid #000;">
<p>
<a name="another-area">
</a>
</p>
Another area text.
</div>
</body>
</html>

<edit> Minot edit. </edit>

[edited by: D_Blackwell at 8:33 pm (utc) on Aug. 6, 2008]

rocknbil

12:37 am on Aug 8, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you mean form buttons, we usually think of forms submitting to a dynamic script, but they can submit to static pages as well . . . .

<form action="yourpage.html#link3"><input type="submit" value="link 3"></form>

<a name="link3" id="link3"></a>
<p> 3 text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text</p>