• 0
Sign in to follow this  
Followers 0

Assign link with an icon font


Question

Posted · Report post

Ho do I assign a link with an icon font? May be I'm wrong with the following code

<div style="font-size: 24px;">
      <i class="icon-coffee" ></i> <a href="http://www.techgainer.com"></a>
</div>

 

Share this post


Link to post
Share on other sites

7 answers to this question

  • 0

Posted · Report post

Hi,

 

If you want to give anything a link, your code has to be wrapped between the <a> </a> tags.

For example:

 

<a href="#"><i class="icon-coffee" ></i></a>

 

Explanation:

 

<a href="#">     <!--Start of link-->

<i class="icon-coffee" ></i>     <!--Icon Start/end-->

</a>     <!--End of link-->

1 person likes this

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Code: 

<a href="http://www.techgainer.com"><img src="http://cdn.techgainer.com/2014/03/22951.png" alt="TechGainer Home" style="float:left width="229" height="51"> </a>

SIte:Techgainer.com   (The code is not live on the site right now. )

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Not sure what you mean by that code, I don't see any icon font in your code ?

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Sorry I'm supposed to post it on another thread! Mistake. Can you make my post down?

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Danny

Yes its working! But icons coming vertically! > http://screencast.com/t/9eMiG1wrlg

 

But I want them horizontally....is the <i> tag guilty?

Here's my code >

<div style="font-size: 24px;">
<a href="http://facebook.com/techgainer"><i class="icon-facebook" ></i></a>
<a href="http://twitter.com/techgainer"><i class="icon-twitter" ></i></a>
<a href="http://plus.google.com/+techgainer"><i class="icon-google-plus" ></i></a>
</div>

Site: techgainer.com

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Fixed that problem!

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Glad you managed to resolve, thank you for updating the thread.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0