我在我的wordpress网站的标题中有一个徽标,我想在它旁边添加一个adsense横幅,如下所示:

对于我的徽标,我有一个div徽标和这个css代码:
#logo { float: left; margin-top: 60px; }我知道我需要为我的adsense代码创建一个新的div,但是我应该使用什么css代码,这样adsense横幅就会出现在徽标的右边?
我需要确保这两个div永远不会重叠(在所有设备上)。
发布于 2014-04-22 21:44:56
这应该是可行的:
HTML:
<div id="logo">
Some code here for the logo
</div>
<div id="ad-banner">
Ad banner goes here
</div>
<div style="clear:both;"> </div>CSS:
#ad-banner
{
float: right;
margin-top: 60px;
}将HTML中的header-middle和#ad-banner样式放入style.css文件中。应该管用的。
https://stackoverflow.com/questions/23230632
复制相似问题