Html 如何将facebook likebox与标题标签保持在同一行?

Html 如何将facebook likebox与标题标签保持在同一行?,html,css,facebook,Html,Css,Facebook,嘿,我想在标题标签(h2)旁边添加一个likebox,并将其保持在同一行。所以它看起来像:这是像ebox一样的标题 然而,现在的情况是,likebox将从这样一条新线路开始: This is the Title LikeBox 有人愿意帮我吗?如果可能的话 我的css是: .post-details h2 { border-bottom: 1px solid #E1E1E1; font-size: 16px; margin: 0 0 0 0; padding: 0 0 5px 0; font-

嘿,我想在标题标签(h2)旁边添加一个likebox,并将其保持在同一行。所以它看起来像:
这是像ebox一样的标题

然而,现在的情况是,likebox将从这样一条新线路开始:

This is the Title
LikeBox
有人愿意帮我吗?如果可能的话

我的css是:

.post-details h2 {
border-bottom: 1px solid #E1E1E1;
font-size: 16px;
margin: 0 0 0 0;
padding: 0 0 5px 0;
font-weight: bold;
}
html代码是:

<h2><?php the_title(); ?><h2>
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="<?php echo get_permalink(); ?>" layout="button_count" show_faces="true" width="50" rel="nofollow"></fb:like>

改用这个:

<div id="fb-root">
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="<?php echo get_permalink(); ?>" layout="button_count" show_faces="true" width="50" rel="nofollow"></fb:like>
</div>
<h2><?php the_title(); ?></h2>

@jonny
h1、h2、h3、
它们都自动采用100%宽度。因此,您必须为
h2
标记指定float

.post-details h2 {
float:left;
border-bottom: 1px solid #E1E1E1;
font-size: 16px;
margin: 0 0 0 0;
padding: 0 0 5px 0;
font-weight: bold;
}
#fb-root {
    float:right;
}
.post-details h2 {
float:left;
border-bottom: 1px solid #E1E1E1;
font-size: 16px;
margin: 0 0 0 0;
padding: 0 0 5px 0;
font-weight: bold;
}
#fb-root {
    float:right;
}