0

所以,

我正在构建一个页面,我希望在其中包含几句文字(例如“联系我们”),然后在同一行上添加图像或图标。我已经能够在JSfiddle中实现这种效果,但是当我将相同的 CSS 和 HTML 传输到 WordPress 时,我的文本和图像总是在不同的行上,正如你在这里看到的那样。我不知道是什么阻止了文本和图像留在同一行。我以为我会通过将此代码添加到主题的 functions.php 文件中来禁用 autop:

// Remove WordPress Auto P
remove_filter( 'the_content', 'wpautop' );
// Auto P is also called in these filters, I'm just adding these lines for your information.
// If you want to disable them, uncomment
// remove_filter( 'the_content', 'wpautop' );
// remove_filter( 'the_excerpt', 'wpautop' );
// remove_filter( 'comment_text', 'wpautop' ); // <-- Be careful with this one 

但也许我错了。我很尴尬被一个看似如此简单的问题难住了,但我希望有人能对这个问题有所了解。

提前致谢,

马卡

4

1 回答 1

0

添加这个:

.bodyheadtext {
  float: left;
}

从. float: left_.bodyhead

于 2012-10-18T02:23:09.363 回答