Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: Anchor Issue
04-19-2014, 07:40 PM #1
- Join Date
- Apr 2014
- Thanked 0 Times in 0 Posts
I'm relatively new to CSS so sorry if this is I'm terrible at explaining.
I've made many anchor layouts for social networking websites over the years, but this is the first time I've tried to do it for a website i'm coding from scratch.
My issue is that i'm trying to make something like this; click (when you click the likes, music, etc links it goes to a new section)
So I want a code that means I can click the headers and it will take me to a new section. With all of the anchor codes i've tried to use, they always just jump down the page to a paragraph. This isn't what I need. I've tried so many different codes and still none of them are giving me the result I want.
So far in my HTML I have;
<div id="menu"> <ul> <li><a href="#home">Home</a></li> <li><a href="#about">About</a></li> <li><a href="#features">Features</a></li> <li><a href="#products">Products</a></li> <li><a href="#contacts">Contact</a></li> </ul> </div> <a name="home"></a> <div class="anchor">
Any help would be appreciated.
04-19-2014, 11:03 PM #2
- Join Date
- Sep 2005
- Sydney, Australia
- Thanked 884 Times in 872 Posts
Get rid of the invalid <a name="home"></a> as those tags are no longer allowed to have a name attribute.
You currently have one anchor in that code - menu - which you don't reference. Simply add the other anchors the same way.
for example <div id="home" class="anchor">