Having a link right to a certain section of your site?

liunx

Guest
Like on ryanbrill.com this link goes to right to the comments <!-- m --><a class="postlink" href="http://ryanbrill.com/archives/w3c-validator-redesign/#comments">http://ryanbrill.com/archives/w3c-valid ... /#comments</a><!-- m --><!--content-->just give an element the id of whatever is after the hash(#). On ryan's site he has <div id="comments"><!--content-->is there anything I can do if I use a class?<!--content-->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)<!--content-->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/<!--content-->that oughta do the trick<!--content-->yup it did thanks :)<!--content-->
 
Back
Top