HTML & CSS
After a user logs in, I want to take them back to the Comments section on my Article page.
How do I do that when I do not want to take them to a link?
I tried adding an anchor in an Heading like this, but NetBeans complains...
You can simply anchor an element by an id, E.g. you can use xxx.com/mypage.php#comments then use the below
Oh, okay. I was trying to use name instead.
As Chris said, the selector (id) will help in achieving what you need. You can also use jQuery to smoothen the scrolling (or jumping).
Yes, the name= setup is outdated now. This is one of the main uses for ids (along with JS hooks). I don't use ids for styling at all now.
This topic is now closed. New replies are no longer allowed.