开发者

How to align Facebook and Tweet buttons?

开发者 https://www.devze.com 2023-02-15 17:21 出处:网络
The Facebook and Tweet buttons on our home page are vertically misaligned, and we\'re confused why. We can top align the two buttons if we use Firebug and remove the height for the Tweet button. Howev

The Facebook and Tweet buttons on our home page are vertically misaligned, and we're confused why. We can top align the two buttons if we use Firebug and remove the height for the Tweet button. However, the height is set dynamically, and inlined, from a Twitter script. We can't seem to override the height value.

Here's the home page: http://www.panabee.com

Are we doing something wrong in the CSS? Or is there a parameter we need to set in the Tweet button to override the height value?

Our only other option is to re开发者_StackOverflow中文版sort to the Twitter iFrame for the Tweet button, which we prefer not to do.

Thanks!


Simply add this CSS: .twitter-share-button { vertical-align:top }.


Just add:

height:63px; to the class of the FB iFrame in CSS:

How to align Facebook and Tweet buttons?


To solve the default style

    <span style="vertical-align: bottom">

can be fixed by seting

    .fb-like {
        line-height: 0.7
    }

or

    .fb-like span {
        position: relative;
        top: -7px
    }

in your CSS

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号