开发者

Aligning 3 buttons in div horizontally

开发者 https://www.devze.com 2023-04-10 16:56 出处:网络
How can I align this 3 buttons horizontally in xhtml? This is for blogger by the way. Here\'s my xhtml for the buttons:

How can I align this 3 buttons horizontally in xhtml? This is for blogger by the way.

Here's my xhtml for the buttons:

<div class='fb-like'>
<fb:like action='like' expr:href='data:post.url' font='arial' layout='button_count' send='true' show_faces='true' width='450'/>
</div>

<div><b:if cond='data:blog.pageType != &quot;static_page&quot;'>
<g:plusone annotation='inline' width='450' expr:href='data:post.url'></g:plusone>
</b:if></div>

<div><b:if cond='data:blog.pageType != &quot;static_page&quot;'>
<a class='twitter-share-button' data-count='none' data-via='MarvinVista' expr:data-text='&quot;Currently reading: &quot; + data:post.title' expr:data-url='data:post.url' href='http://twitter.com/share'>Tweet</a开发者_如何学JAVA>
</b:if></div>


You can place them in a containing div, give each div a set width and then float them to the left.


HTML

<div class='fb-like share-button'>
<fb:like action='like' expr:href='data:post.url' font='arial' layout='button_count' send='true' show_faces='true' width='450'/>
</div>

<div class="share-button"><b:if cond='data:blog.pageType != &quot;static_page&quot;'>
<g:plusone annotation='inline' width='450' expr:href='data:post.url'></g:plusone>
</b:if></div>

<div class="share-button"><b:if cond='data:blog.pageType != &quot;static_page&quot;'>
<a class='twitter-share-button' data-count='none' data-via='MarvinVista' expr:data-text='&quot;Currently reading: &quot; + data:post.title' expr:data-url='data:post.url' href='http://twitter.com/share'>Tweet</a>
</b:if></div>

CSS

.share-button{display:inline-block;}
0

精彩评论

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