I've got an icon within a link tag and I'm trying to make it circular, but it fits to the content rather than being set by my width and height settings. Here's what I mean: https://i.stack.imgur.com/BMlMQ.png
My code is like this:
html:
<div class="small-4 columns switchButton">
<a href="#">
<i class="icon-bolt"></i>
</a>
</div>
And my CSS is like this:
.switchButton
text-align: center
margin: 60px 0 60px 0
.switchButton a
text-decoration: none
width: 80px
height: 80px
font-size: 40px
padding: 20px
-moz-border-radius: 40px
-webkit-border-radius: 40px
border-radius: 40px
The icon is by font-awesome and has the following CSS:
a [class^="icon-"], a [class*=" icon-"] {
display: inline;
}
[class^="icon-"], [class*=" icon-"] {
display: inline;
width: auto;
height: auto;
line-height: normal;
vertical-align: baseline;
background-image: none;
background-position: 0% 0%;
background-repeat: repeat;
margin-top: 0;
}
[class^="icon-"], [class*=" icon-"] {
font-family: FontAwesome;
font-weight: normal;
font-style: normal;
text-decoration: inherit;
-webkit-font-smoothing: antialiased;
So, even though the width and height are set, it still fits to the icon. Any ideas?
Relevant JSFiddle: http://jsfiddle.net/babaggeii/QZSwn/2/ - you can see that the a tag fits the text rather than the dimensions specified.