/    Sign up×
Community /Pin to ProfileBookmark

linking to a certain section on a page

My home page has 4 short news introductions (links). When you click on one of the stories (links). You are linked to the news.html page, however i want it to link to the news.html page and automatically go down to the section on the page where the story is. How do i do this? [COLOR=”RoyalBlue”]Thanks in advance…[/COLOR]

to post a comment
HTML

3 Comments(s)

Copy linkTweet thisAlerts:
@ryanbutlerMar 19.2007 — In your news.html page, set section anchors to each story:

[CODE]<a id="news1"></a>

<a id="news2"></a>[/CODE]


On the page where the short description appears, do this:

[CODE]<a href="news.html#news1">Read more...</a>[/CODE]
Copy linkTweet thisAlerts:
@tcaMar 19.2007 — Ryan is correct but you can accomplish the same thing with any block element with a unique id. i.e. <div id="news1">, <div id="news2">, etc.
Copy linkTweet thisAlerts:
@oo7mlauthorMar 19.2007 — thanks guys
×

Success!

Help @oo7ml spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.15,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...