0

我正在建立一个网站,我的页面底部有三个广告。他们出现但在那里自己的行。我已经尝试了从创建浮动 div 到删除 div 的所有方法。但我似乎无法弄清楚 CSS 的哪一部分不允许这些框直接穿过页面。

这是三个盒子的代码:

<div class="wrapper margin-bot1">
    <div class="bg-3">
        <div class="indent">
            <div class="wrapper margin-bot">
                <img src="http://www.webstertoolbox.com/media/wysiwyg/images/page1_img1.png" alt="" />
                <img src="http://www.webstertoolbox.com/media/wysiwyg/images/logo_archilume.png" alt="" width="150" height="41" />
            </div>
            <ul class="ul-1">
                <li><a href="moreARCHI.html">Made in USA </a></li>
                <li><a href="moreARCHI.html">Expert Domestic Tech Support</a></li>
                <li><a href="moreARCHI.html">High-end installations</a></li>
                <li>Robust features</li>
            </ul>
            <a class="button-1 margin-left" href="more.html">Click to Order Now!</a>
        </div>
    </div>
    <div class="bg-3">
        <div class="indent">
            <div class="wrapper margin-bot">
                <img  src="http://www.webstertoolbox.com/media/wysiwyg/images/page1_img1.png" alt="" />
                <a href="moreGEN.html"> <img src="http://www.webstertoolbox.com/media/wysiwyg/images/GenLume-Logo.png" alt="" width="103" height="41" /></a>
                <div class="extra-wrap">&nbsp;</div>
            </div>
            <ul class="ul-1">
                <li><a class="test123" href="moreGEN.html">Quick solutions</a></li>
                <li><a href="moreGEN.html">Turn-key applications</a></li>
                <li><a href="moreGEN.html">Certified</a></li>
                <li><a href="moreGEN.html">Competitive pricing</a></li>
            </ul>
            <a class="button-1 margin-left" href="moreGEN.html">Click to Order Now!</a>
        </div>
    </div>
    <div class="bg-3">
        <div class="indent">
            <div class="wrapper margin-bot">
                <img src="http://www.webstertoolbox.com/media/wysiwyg/images/page1_img1.png" alt="" />
                <div class="extra-wrap">
                    <h4>DuraLume</h4>
                    <h5>Series</h5>
                </div>
            </div>
            <ul class="ul-1">
                <li><a href="more.html">Expert Domestic Tech Support</a></li>
                <li><a href="more.html">Made in USA </a></li>
                <li><a href="more.html">Custom solutions</a></li>
                <li><a href="more.html">On-site Engineers</a></li>
            </ul>
            <a class="button-1 margin-left" href="more.html">Click to Order Now!</a>
        </div>
    </div>
</div>

我不知道如何正确显示 CSS,但您可以在此处找到实际站点:http ://www.webstertoolbox.com/

如果您查看大横幅下方,您将看到垂直向下运行的 ArchiLume、GenLume 和 DuraLume 框。我希望它们出现在页面上。

有人可以告诉我我做错了什么以及如何解决吗?

谢谢,弗兰克 G。

4

2 回答 2

1

修复它非常容易和快速。只需在第 128 行更改名为 homeads.css 的 css 文件:

.bg-3 
{
    background: url(../images/bg-4.png) left top no-repeat;
    width: 33%;  // Changed this from 100% to 33%
    height: 322px; //Changed from 268px to 322px
    overflow: hidden;
    float: left;  // Added the float left
}

干杯,灭霸

编辑:进行上述更改后,您需要添加更多更改以修复一些会有点错位的事情。比如右边框将不再可见。以下是您也需要进行的更改以解决该问题。

在 homeads.css 第 33 行:

.main 
{
    width: 950px; // Reduced this to match with the parent's width
    padding: 0;
    margin: 0 auto;
    position: relative;
}

在 sceleton.css 第 25 行:

.grid_1, .grid_2, .grid_3, .grid_4, .grid_5, .grid_6, .grid_7, .grid_8, .grid_9, .grid_10, .grid_11, .grid_12, .grid_13, .grid_14, .grid_15, .grid_16, .grid_17, .grid_18, .grid_19, .grid_20, .grid_21, .grid_22, .grid_23, .grid_24 
{
    float: left;
    display: inline;
    //margin-left: 5px;    Remove these 2
    //margin-right: 5px;   Remove these 2
}

EDIT2:第一个盒子被向下推了一点。这是因为在第一个盒子上你缺少一个 div <-> 在第二个和第三个盒子上你有一个额外的 div 里面。

<div class="wrapper margin-bot">
    <img src="http://www.webstertoolbox.com/media/wysiwyg/images/page1_img1.png" alt=""><a href="moreGEN.html"> <img src="http://www.webstertoolbox.com/media/wysiwyg/images/duralume.gif" alt="" width="103" height="41"></a>
    <div class="extra-wrap">&nbsp;</div> // THIS IS THE EXTRA DIV
</div>

您在这里有 2 个选择:

1)添加div

<div class="extra-wrap">&nbsp;</div>

到第一个盒子

2)从框 2 和 3 中删除该 div。

于 2013-07-31T05:47:14.283 回答
1

.cms-home类帮助你不影响其他页面布局。添加您的样式表:

.cms-home .wrapper {
    overflow: visible; //For big banner
}
.cms-home .bg-3 {
    overflow: visible;
    width: 33%;
    display: inline-block;
}
于 2013-07-31T06:00:15.937 回答