Need Help With Page Display

  • suforum
  • Newbie
  • Newbie
  • suforum
  • Posts: 6

Post 3+ Months Ago

Hello folks!
I want to create a link on my home page that will take the viewer directly to the position on my page where the subject of the link is. What would I add to:
<a href="index.html">Todays Opinion</a> in order to move the page to the place where "Todays Opinion" is located?
Thanks!
  • Breeze
  • Photographer
  • Guru
  • User avatar
  • Posts: 1029
  • Loc: Australia

Post 3+ Months Ago

What you're talking about is linking to anchors - basically it's the same as normal links, but instead of "index.html" you'd put "#TodaysOpinion".

However first you must create the anchor, which is fairly simple. Where the content is you add this:

Code: [ Select ]
<a name="TodaysOpinion">Todays Opinion</a><br />
Today is Wednesday. Wednesday likes long walks on the beach at sunset, and thinks that it should be sunset all the time.
  1. <a name="TodaysOpinion">Todays Opinion</a><br />
  2. Today is Wednesday. Wednesday likes long walks on the beach at sunset, and thinks that it should be sunset all the time.


And then it's just the simple matter of creating the link where you want it:

Code: [ Select ]
<a href="#TodaysOpinion">Todays Opinion</a>


And that will take you to that spot on the page.

That's all well and good for linking to a spot on the same page, but if you want to link to a specific point on another page there's a slight tweak:

Code: [ Select ]
<a href="index.html#TodaysOpinion">Today's Opinion</a>

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 35 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.