Miha Šušteršič
Miha Šušteršič

Reputation: 10042

html anchors with whole div as link

I have a div which contains some text (icon font icon), and a paragraph that shows what the icon means underneath. I want to link the whole thing to an anchor on my page, but so far it's not working. First time using anchors following this tutorial, and can't figure out what I did wrong (tried changing div's id to name, still didn't work).

html:

<a href="#skills"><div class="menucontainer">
        <a class="icon ion-code-working"></a>
        <p>Skills</p>
</div></a>

<section id="skills">
    <div class="skills-container">
        <ul>
            <li>< html5 ></li>
            <li>.body { css3 }</li>
            <li>javascript.js</li>
            <li>$(jQuery)</li>
            <br/>
            <li><%= puts "rails 4" %></li>
            <li>< div class="bootstrap" ></li>
            <br/>
            <li>$ sudo apt-get update</li>
            <br>
            <li class="profile-icon">LinkedIn</li>
            <li class="profile-icon">GitHub</li>
            <li class="profile-icon">Udemy</li>
            <li class="profile-icon">Codecademy</li>
            <li class="profile-icon">Treehouse</li>
        </ul>
    </div>
</section>

Upvotes: 1

Views: 80

Answers (1)

Scott Hunter
Scott Hunter

Reputation: 49803

You have an anchor inside a div inside another anchor..

Upvotes: 1

Related Questions