A few weeks back I showed you how to add a pure HTML sidebar quicklinks navigation using Unicode.  Here for another short installment, I'll show you how to add symbols beside different types of links using Unicode and CSS

 

We Create Unicode Icons By Using CSS. You always see Icons beside certain types of links like:

  • Message or Letter Icon.
  • Arrow Icon.
  • Telephone Icon.
  • Quotation Icon.
  • Alert Icon.

These Icons Can be created automagically by using CSS.
Here is The CSS Code.

<style type="text/css">
a[href^="mailto:"]:before { content: "2709"; }
.phone:before { content: "2706"; }
.important:before { content: "27BD"; }
blockquote:before { content: "275D"; }
blockquote:after { content: "275E"; }
.alert:before { content: "26A0"; }
</style>

And here is some example HTML

<p>
<a href="mailto:info@yourdomain.com">
info@yourdomain.com
</a>
</p>

<p class="phone">
444-444-444
</p>

<p class="important">
REMEMBER: Don't get drunk and code.
</p>

<blockquote>
If it ain't broke, fix it until it is.
</blockquote>

Unicode isn't the answer to everything, but it is lighter than an image, so give it a try!

Tags: CSS, HTML, example, links, style, tip, trick, unicode

Views: 473

Reply to This

Replies to This Discussion

i implemented this on my site, great tip! but for some reason i had to add the code to an ad box above the header bcuz placing it in the custom code box made it appear at the bottom of thde home page, also when I browse the site from different browsers the pictures dissappear and only display numbers, any help? and making them a bit bigger would be cool :)

RSS

Latest Activity

SM replied to SM's discussion 'How to Target the First Page of your Site with CSS'
"Hi Suzie, it's a bit hard to understand but very simple to implement. And the pay off if huge…"
5 minutes ago
Monica Diaz replied to Monica Diaz's discussion 'How are you using member categories in Ning 3.0?'
"Hi SP,  Do you mean that this blog instance will be something that a particular member…"
12 minutes ago
Monica Diaz replied to Monica Diaz's discussion 'How are you using member categories in Ning 3.0?'
"Hi Jen,  That sounds like an awesome use of this feature.  Thanks for sharing!"
15 minutes ago
Kos replied to John Bizley's discussion 'New Adjustments For Your Video Player To Make It Stand Out From The Site Background'
"Amaaazing!"
23 minutes ago

NC for Hire
JFarrow replied to John Bizley's discussion 'New Adjustments For Your Video Player To Make It Stand Out From The Site Background'
"Sweet..thanks brother!"
34 minutes ago
John Bizley replied to John Bizley's discussion 'A few adjustment for your video feed player in your social channels page.'
"Thanks J for your kind words. I have just updated another tip that I have done on my video page if…"
37 minutes ago
Robert Paul commented on kid k's group 'Ning French Networks'
"@ Caro. Je sais ce que vous faites. Je serais tout à fait d'accord pour rester avec…"
1 hour ago
caro replied to Jean Claude BOUSSON's discussion 'Construire son site en français !?' in the group Ning French Networks
"kikou ben t mal barrer avec moi autant j'ecris des poèmes autant en live j'abrege…"
1 hour ago

© 2013   Created by Ning.

Badges  |  Report an Issue  |  Terms of Service