3

I want to erase the annoying spacing between fa icons(with background) in this jsfiddle.

I tried margin and word-spacing but it didn't work.

CSS of the icons container :

.home-header-sm {
  text-align: right;
  margin-right: 20px;
  font-size: 20px;
  word-spacing: 0px;
}

.home-header-sm a,
.home-header-sm a:visited,
.home-header-sm a:hover,
.home-header-sm a:active {
  color: #FFFFFF;
}

.fa {
  text-align: center;
  border-style: solid;
  background-color: #ffffff;
  color: #1D233D;
  width: 30px;
  padding-top: 3px;
  padding-bottom: 3px;
  margin: 0px 0px 0px 0px !important;
}
Vucko
  • 20,555
  • 10
  • 56
  • 107
Pro Haitham
  • 89
  • 2
  • 10

2 Answers2

2

You have two issues.

1) Your icons have a border around them. Remove it with:

.fa { border: none; }

2) Second, remove the whitespace between the tags in the html.

Michael Arrison
  • 1,464
  • 2
  • 13
  • 22
1

You can remove the border, float the icons to the left, and float the holding container to the right:

https://jsfiddle.net/ww1nescm/1/

.fa {
  border-width: 0;
  float: left;
}

.home-header-sm {
  float: right;
  width: auto;
}
Frits
  • 7,341
  • 10
  • 42
  • 60