SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast thehung1724's Avatar
    Join Date
    Sep 2013
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to align center font-icon?

    Here my code, i use font-awesome but in my project i use icomoon. But i don't know how to align center theme, i use "text-align" or "verticle-middle" but all of theme didn't work.

    Code:
    http://codepen.io/thehung1724/pen/FJjmd

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    39,821
    Mentioned
    158 Post(s)
    Tagged
    4 Thread(s)
    Hi,

    If you are talking about that blue circle then just give it a negative margin of half its width and it will be centred.

    Code:
    #features .icon_bg span {
        background: none repeat scroll 0 0 #71B6D5;
        border-radius: 50% 50% 50% 50%;
        height: 30px;
        left: 50%;
        position: absolute;
        top: 0;
        width: 30px;
    margin-left:-15px;
    }


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •