The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Anchors work only in IE?
Vio
post May 9 2007, 12:29 PM
Post #1





Group: Members
Posts: 2
Joined: 9-May 07
Member No.: 2,768



Hello everyone.

I haven't made a webpage in a decade. I'm using HTML-kit now, but that's irrelevant...

Here is an example of what I mean. The links on top of the page are supposed to jump to other section within the page, but I noticed it only works in Internet Explorer. Help. Thank you!
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post May 9 2007, 01:22 PM
Post #2


WDG Member
********

Group: Root Admin
Posts: 8,365
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



You use <a href="#1"> (which is fine) and <a name="#1"> (which should be <a name="1">).

While you're at it, the online validator reports quite a few HTML errors.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Effovex
post May 9 2007, 06:21 PM
Post #3


Serious Coder
*****

Group: Members
Posts: 251
Joined: 6-January 07
From: Sherbrooke, Qc, Canada
Member No.: 1,477



Actually, 1 isn't a valid name

QUOTE(the specs)
ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods (".").

http://www.w3.org/TR/html401/types.html#type-cdata
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Vio
post May 9 2007, 06:31 PM
Post #4





Group: Members
Posts: 2
Joined: 9-May 07
Member No.: 2,768



Thank you, it worked. I also used HTML-tidy in Html-kit, which fixed those errors you mentioned Darin.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post May 9 2007, 11:14 PM
Post #5


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,732
Joined: 9-August 06
Member No.: 6



QUOTE(Effovex @ May 10 2007, 01:21 AM) *

Actually, 1 isn't a valid name


Yeah, I have actually seen situations when a name or id starting with a number didn't work as an anchor. Peculiarly enough I think the browser that refused to use it was IE.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 27th April 2024 - 02:13 AM