Click to See Complete Forum and Search --> : Having a link right to a certain section of your site?


Conor
05-17-2004, 07:40 PM
Like on ryanbrill.com this link goes to right to the comments http://ryanbrill.com/archives/w3c-validator-redesign/#comments

Sam
05-17-2004, 07:58 PM
just give an element the id of whatever is after the hash(#). On ryan's site he has <div id="comments">

Conor
05-17-2004, 08:05 PM
is there anything I can do if I use a class?

Sam
05-17-2004, 08:10 PM
Nope, has to be id or name(not allowed in xhtml strict AFAIK). The premise behind a class attribute is that it can be used at multiple places in a document, which would confuse the browser (it wouldn't know which section to jump to)

Conor
05-17-2004, 08:12 PM
Ok well I came up with something, I have a comment class and each coment is in a <div class="comment"> and I added a <div id="comments"> around it that should work right because I cant test it now seeing as my database is down/

Sam
05-17-2004, 08:22 PM
that oughta do the trick

Conor
05-18-2004, 06:03 AM
yup it did thanks :)