【发布时间】:2015-04-13 03:11:41
【问题描述】:
我刚刚注册了 Adsense,并收到了 Adsense 代码。但是,我不知道将它放在我的 MVC 应用程序的哪里。在我的_layout.cshtml 文件中,我有以下 div 部分:
<div id="bodyContentDiv" class="container body-content">
<div class="row">
<div id="bodyDiv" class="col-sm-11">
@RenderBody()
<footer>
<hr />
</footer>
</div>
<div id="advertisementDiv" class="col-sm-1" style="height: 850px; border-left: 1px solid; border-color: lightgray">
<br />
<br />
<p class="text-muted">
Sponsors & Links
</p>
<br/>
<a id="fatbirderAdLink" href="http://www.xxxxxx.com/"><img src="~/Advertising/Fatbirder.png" title="Fatbirder"></a>
<hr class="advertising"/>
<a id="birdAndDineAdLink" href="http://www.xxxxx.com/"><img src="~/Advertising/BirdAndDine.png" title="Watch birds and enjoy good food"></a>
</div>
</div>
</div>
我希望 Adsense 广告出现在 ID 为 advertisementId 的 div 中,就在 ID 为 birdAndDineAdLink 的 a 标记下方。但我不知道如何让它出现在那里,或者即使我可以。
我确实尝试将代码粘贴到“birdAndDineAdLink”div 下方,但出现以下错误:
未捕获的错误:找不到容器的响应大小 width=118px 和 data-ad-format=auto
所以我认为我做错了什么。
我选择了响应式 AdSense 广告类型。
【问题讨论】:
标签: adsense