PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Friday, November 18, 2022

[FIXED] How to vertically center text with larger icon?

 November 18, 2022     css, font-awesome, twitter-bootstrap-3, vertical-alignment     No comments   

Issue

I am using a Font Awesome icon in the modal of success. I want to make the icon bigger, the problem is the text is no longer vertically centered if I do that.

enter image description here

<div class="alert alert-success alert-dismissible">
  <span class="fa fa-check-circle" aria-hidden="true" style="font-size: 32px;"></span>
  <strong> You have successfully set up an administration for this client.</strong>
</div>

Solution

You can use vertical-align:

.fa {
  vertical-align: middle;
}

jsFiddle

Or, use flexbox:

.alert {
  display: flex;
  align-items: center;
}

jsFiddle



Answered By - Stickers
Answer Checked By - Mildred Charles (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

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

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing