0

我有一段文本需要在下面有 3 个 div,但我似乎无法弄清楚 CSS。

我以前用过float,它在 Chrome 和 FF 中运行良好,但后来在 IE8 中无法运行,所以我现在删除了浮动,我inline-block在父 div 上使用,但我似乎做对了。

这是我到目前为止所拥有的小提琴:

<div class="allinfo">



<div class="menu">

<div class="menutop">
WATCHGUARD SHOP MENU
</div>


<span>
<ul class="menuoptions">

<li><span class="redtext">WatchGuard Home</span></li>

<li>XTM Series Firewalls</li>

<li>XCS Series Firewalls</li>

<li>SSL VPN Encryption</li>

<li>Security In Education</li>

<li>Wireless Access Points</li>

<li>FREE Quotation</li>
</ul>

<div class="tradein">
TRADE IN
</div>
<div class="tradeininfo">
<strong>Trade Up</strong><br>
Trade in an earlier generation WatchGuard appliance or any approved non-WatchGuard appliance-based security solution, and trade up to eligible new WatchGuard solutions at 25% off the standard purchase price. </div>

</div>


<div class="whitepapers">
WHITEPAPERS
</div>

<div class="whitepapersinfo">

<ul>

<li>Take Back Control</li>

<li>Data Loss Prevention</li>

<li>Securing the Virtual World</li>

</ul>

</div>
</div>

<div class="maintext">
<h5>Welcome To The WatchGuard Homepage</h5><br>

<p>WatchGuard builds affordable, all-in-one network and content security solutions to provide defense in depth for corporate content, networks and the businesses they power.</p>

<p>WatchGuard's award-winning extensible threat management (XTM) network security solutions combine firewall, VPN and security services to protect networks from spam, viruses, malware and intrusions.</p>

<p>The new Extensible Content Security (XCS) appliances offer content security across e-mail and web combined with data loss prevention for complete content protection.</p>

<p>WatchGuard extensible solutions scale to offer right-sized security for small businesses up to enterprises with 10,000+ employees.</p>

<p>Since our founding in 1996, more than 600,000 WatchGuard signature red security appliances have been deployed worldwide. Today more than 15,000 dedicated partners back our products in 120 countries.</p>
</div>

<div class="product">
<span>WatchGuard SSL/VPN</span><br><br><br>
<img src="images/watchguard-tb-ssl.jpg" width="199"><br><br>
<p>
Remote connectivity. Secure remote access that just works.</p>

</div>

<div class="product">
<span>WatchGuard XCS</span><br><br><br>
<img src="images/watchguard-tb-xcs.jpg" width="117" height="72"><br><br>
<p>
Content security. Defense in-depth email security and web security.</p>

</div>

<div class="product">
<span>WatchGuard XTM</span><br><br><br>
<img src="images/watchguard-tb-xtm.jpg" width="122" height="72"><br><br>
<p>
Multi-function firewalls. Incredible speed. Unbelievable value.</p>
</div>


</div>

小提琴

这就是我要的:

在此处输入图像描述

4

2 回答 2

1

我添加了浮动而不是内联块,请告诉它在ie8中是否好,我不知道:

.allinfo {
   float: left;
}

.maintext {
    float: right;
    width:700px;
    height:500px;
    position:relative;
    top:40px;
    font-size:smaller;
    font-weight:normal;
    vertical-align:top;
}

.product {
    width:205px;
    height:205px;
    border-style:solid;
    border-width:1px;
    border-color:#CCC;
    margin:4px;
    right:25px;
    padding:10px;
    text-align:center;
    float: right;
}

提琴手

IE8

于 2013-10-28T13:34:51.587 回答
-1

希望这是您正在寻找的 html 代码。它与您定义的模式相同。根据您的要求更改代码。

<style type="text/css">
.smallBottomDivs
{
   width:100px; height:100px; display:inline-block; background-color:#0CC;
}
.MainDivs
{
   height:200px; display:inline-block; background-color:#F00;
}
</style>
<div style="display:block;">
    <div class="MainDivs" style="width:100px;float:left;"></div>
    <div class="MainDivs" style="width:350px;">
           <div style="width:300px; display:block; height:100px;"></div>
           <div style="width:350px; display:block;">
               <div class="smallBottomDivs"></div>
               <div class="smallBottomDivs"></div>
               <div class="smallBottomDivs"></div>
           </div>
        </div>
    </div>
于 2013-10-28T13:15:08.240 回答