Alexander Kozhokar Alexander Kozhokar -4 years ago 172
CSS Question

How can I remove vertical padding from ionic icon?

Here is my HTML :

<i class="icon ion-email notify-icon"></i>

and CSS:

.notify-icon {
color: white;
font-size: 35px;
background-color: gray;
padding: 0;

I set padding to 0 and it removes horizontal padding, but I still see 4-5px of gray padding on top and bottom. How can I solve it?

As I understood it is impossible to remove vertical padding, so I decided to replace ionic icon with image.

Answer Source

Don't know why you want to use background color but if you wanted gray email icon with size 35px do this. Full implementation here

.notify-icon {
  color: gray;
  font-size: 35px;

Or if you wanted bordered icon use

 <i class="icon ion-ios-email-outline notify-icon2 ">


 .notify-icon2 {
  font-size: 35px;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download