Sm00rf9000
Sm00rf9000

Reputation: 541

Image links to Twitter profile

I am currently working on my website, but I have run into a problem. I have a Twitter button, that links to my Twitter profile, but when I make an image or a text on the website it becomes a link and if i click it, it goes to the Twitter profile. I cant seem to find the mistake.

Here is some of my code.

<!DOCTYPE html>

    <title>Home</title>

        <div class="PageLinkBar">
            <ul class="ScrollPagelsidebar">

                <li><a href="contact.html">Contact</a></li>
                <li><a href="company.html">Company</a></li>
                <li><a href="games.html">Games</a></li>

            </ul>
        </div>

    <div class= "image2">
            <a href="index.html"><img src="image2.png" alt="image2" title="image2" border="0" width= 150px; height= 100px; />
    </div>

    <div class="twitterbutton">
            <a href="https://twitter.com/"><img src="TwitterLogo.png" alt="Twitter" title="Twitter logo" border="0" width=29; height=29;/>
    </div>

    <div class="image2">
            <img src="image2.png" alt="image2" style="width:1050px;height:530px">
    </div>

    <div class="image">
            <img src="image.png" alt="image" style="width:400px;height:40px">
    </div>

    <div class="TwitterbuttonNRGindex">
            <a href="https://twitter.com/"><img src="TwitterLogo.png" alt="Twitter" title="Twitter logo" border="0" width=29; height=29;/>
    </div>

Upvotes: 1

Views: 145

Answers (2)

graycodes
graycodes

Reputation: 363

You need to close your <a> tags, as so:

<!DOCTYPE html>
    <title>Home</title>

        <div class="PageLinkBar">
            <ul class="ScrollPagelsidebar">

                <li><a href="contact.html">Contact</a></li>
                <li><a href="company.html">Company</a></li>
                <li><a href="games.html">Games</a></li>

            </ul>
        </div>

    <div class= "image2">
            <a href="index.html"><img src="image2.png" alt="image2" title="image2" border="0" width= 150px; height= 100px; /></a>
    </div>

    <div class="twitterbutton">
            <a href="https://twitter.com/"><img src="TwitterLogo.png" alt="Twitter" title="Twitter logo" border="0" width=29; height=29;/></a>
    </div>
    <div class="image2">
            <img src="image2.png" alt="image2" style="width:1050px;height:530px">
    </div>

    <div class="image">
            <img src="image.png" alt="image" style="width:400px;height:40px">
    </div>

    <div class="TwitterbuttonNRGindex">
            <a href="https://twitter.com/"><img src="TwitterLogo.png" alt="Twitter" title="Twitter logo" border="0" width=29; height=29;/></a>
    </div>

Upvotes: 0

Thaillie
Thaillie

Reputation: 1362

The twitter button and twitterbuttonnrgindex are missing the </a> closing tags. This could couse everything to display as a link becouse the browser thinks everything is in the <a> tag.

Upvotes: 1

Related Questions