Monday, March 4, 2013

FontFace & Font Awesome in CSS

# Use Font-face to incorport the font before using this:

.element {
    position: relative;
}

/*replace the content value with the
corresponding value from the list below: \f002 - icon; search \f004 -icon-heart

.element:before {
    content: "\f000";
    font-family: FontAwesome;
    font-style: normal;
    font-weight: normal;
    text-decoration: inherit;
/*--adjust as necessary--*/
    color: #000;
    font-size: 18px;
    padding-right: 0.5em;
    position: absolute;
    top: 10px;
    left: 0;
}


Find content code here: http://astronautweb.co/snippet/font-awesome/

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.