recoInrelax
recoInrelax

Reputation: 707

HTML weird hyperlink not working

I have my Joomla website, and in an article i have this code:

<a href="http://www.google.com" target="_blank">Facebook</a>

<div id="mmm" style="position: absolute; padding-top: 85px; padding-left: 455px;">{loadposition google_mapa}</div>
<hr />
<h4 style="padding-left: 60px; color: #99cc33; text-align: left;">Contactos:       </h4>
<hr />

<p class="MsoNormal" style="padding-left: 60px; text-align: justify;">
<span style="font-family: Century, serif;"><br /><img src="images/fb.png" border="0" width="25" height="25" style="border: 0; vertical-align: middle;" />
</span></p>
<a href="http://www.google.com" target="_blank">Facebook</a>

My problem is, the first hyperlink is the same as the second, but the first work and the second don't. Any help would be appreciated,

John

EDIT: SORRY. I Accidentally copied the <p> inside the href. It isnt working

EDIT2: When i mean not working, it means it is not 'clickable', it looks like hyperlink but when i click nothing happens

EDIT3: The problem is in here:

<div id="mmm" style="position: absolute; padding-top: 85px; padding-left: 455px;">
<p> </p>
<p>{loadposition google_mapa}</p>
</div>

If i take out this, the links work. no idea why.

Upvotes: 0

Views: 5035

Answers (4)

Telmo Marques
Telmo Marques

Reputation: 5106

You should take the </p> tag out of the href attribute for the URL to work.

EDIT:

The map div, loaded here:

<div id="mmm" style="position: absolute; padding-top: 85px; padding-left: 455px;">{loadposition google_mapa}</div>

is somehow affecting the links on the left, mainly because of the CSS property position: absolute.

As an alternative, you can try using two div's beside each other like showed in this fiddle.

<div style="float: left; margin-right: 20px; border: solid 1px">
    <p>Facebook</p>
    <p>Address</p>
    <p>Email</p>
</div>
<div style="float: left; border: solid 1px">
    Map
</div>

Upvotes: 4

Salt Hareket
Salt Hareket

Reputation: 764

not same.. you need to remove </p> tag from second one.

Upvotes: 0

Sheridan Bulger
Sheridan Bulger

Reputation: 1214

The first hyperlink is not the same as the second one. The second one has a </p> in the href attribute, and </p>http://www.google.com is not a valid url.

Change the second one to:

<a href="http://www.google.com" target="_blank">Facebook</a>

Upvotes: 1

Etienne Carrier
Etienne Carrier

Reputation: 240

You have a closing p tag in your link...

Facebook

Upvotes: 4

Related Questions