Reputation: 215
I have the following code and my paragraph tag that is not wrapped in an anchor tag is auto generating an anchor tag. The "Connect with us on social media" paragraph is the problem. It links to a redirect page when inspecting in firebug. Why is this happening only in this place? I simply don't want it to be a link.
<div class="col-lg-6 col-sm-6 social">
<p>Connect with us on social media</p>
<p>
<a class="facebook" href="https://www.facebook.com/pages/G-S-Masters-Inc/180291982077400" target="_blank">Facebook</a>
/
<a class="twitter" href="https://twitter.com/GSMastersInc" target="_blank">Twitter</a>
</p>
</div>
Here is the css for those classes:
#footer .social {
text-align: right;}
#footer .facebook {
color: #685642;}
#footer .twitter {
color: #685642;}
.col-lg-6 {
width: 50%;}
.col-sm-6 {
width: 50%;}
The last two are twitter bootstrap scaffolding classes. I'm pretty sure the problem doesn't lie with those. They apply to different screen resolutions, so it's not duplicate code.
Upvotes: 0
Views: 1466
Reputation: 11
The problem is in html code, if missing </a>
ending tag at the last of any anchor it will take effect next paragraph as anchor.
before your problematic part you probably mistook to end the previous anchor with </a>
.
Upvotes: 1
Reputation:
Generally people put anchor tags outside of paragraphs. Don't do this:
<div class="col-lg-6 col-sm-6 social">
<p>Connect with us on social media</p>
<p><a class="facebook" href="https://www.facebook.com/pages/G-S-Masters-Inc/180291982077400" target="_blank">Facebook</a> /
<a class="twitter" href="https://twitter.com/GSMastersInc" target="_blank">Twitter</a></p>
</div>
Instead try this:
<div class="col-lg-6 col-sm-6 social">
<p>Connect with us on social media</p>
<a class="facebook" href="https://www.facebook.com/pages/G-S-Masters-Inc/180291982077400" target="_blank">
<p>Facebook</p>
</a>
<a class="twitter" href="https://twitter.com/GSMastersInc" target="_blank">
<p>Twitter</p>
</a>
</div>
Upvotes: 0