Vertical Align Text After Font Icon

前端 未结 3 1047
孤街浪徒
孤街浪徒 2020-12-02 02:47
3条回答
  •  無奈伤痛
    2020-12-02 03:41

    Use CSS Flexbox. Make a parent

    that wraps icon and text into it (in my case its icon-holder) and make it a flexbox container using display: flex.

    Have a look at the snippet below:

    .icon-holder {
      display: flex; /* Flex Container */
      align-items: center; /* Vertically Align Content */
    }
    
    .blue {
      color: #33b5e5;
    }
    
    span {
      color: #fff;
    }
    
    h4 {
      padding-left: 5px;
    }
    
    
    

    Free wifi

    Hope this helps!

提交回复
热议问题