Jump to content

How to place facebook text in center


newcoder1010

Recommended Posts

Hi,

 

I have this html:

<table class="socialmedia">
<tbody><tr><td class="facebbok"> <a href="https://www.facebook.com/" target="_blank" title="Facebook"> f</a> </td>
<td class="twitter"> <a href="https://twitter.com" target="_blank" title="Twitter">t</a>
 </td>
</tr></tbody></table>

I like to put f and t in circled and then centered. I got the circle but it is not putting in the center. Please advise.

 

td.facebbok a {
    float: left;
    padding: 5px;
    /* margin: 5px; */
    width: 40px;
    height: 40px;
    border-radius: 50px;
    font-size: 20px;
    line-height: 100px;
    text-align: center;
    background: #34289c;
}

 

Link to comment
Share on other sites

Setting the text-align to center will make the contents of the table cell be centered assuming they're not blocks.

 

You should not be using a table for this, it's really bad.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...