Welcome to WebmasterWorld Guest from 3.227.233.55

Forum Moderators: open

Message Too Old, No Replies

Internal page links with button

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

New User

10+ Year Member

joined:May 12, 2006
posts:21
votes: 0


I was wondering, is it possible to link to different parts of the same page by using a button instead of a text link?
8:29 pm on Aug 6, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:June 29, 2003
posts: 1676
votes: 0


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]

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

Senior Member

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Nov 28, 2004
posts:7999
votes: 0


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>

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members