div之间出现空格

时间:2013-01-10 13:52:16

标签: css html space

这是页面代码,您可以在下面找到代码的图像:

<body style="color: #25670c; margin: 0 0 0 0; padding: 0 0 0 0; font-family : Times New Roman; font-size : 16px; text-align: center;">

<div style="width:985px; margin:0 auto; background-color:#d6d6a4;">
<div style="height: 96px; width: 985px;"><a href="http://stores.ebay.co.uk/Digi-Spot">
    <img border="0" src="http://www.gvcdigital.co.uk/images/graphic/header.png" width="985" height="96" alt="header" title="DigiSpot eBay store" /></a></div>
<div style="height: 41px; width: 985px;">
    <img border="0" src="http://www.gvcdigital.co.uk/images/graphic/meniu.png" alt="DigiSpot meniu" width="985" height="41" usemap="#mapas" />

<map name="mapas">
  <area shape="rect" coords="56,0,0,41" href="http://stores.ebay.co.uk/Digi-Spot" alt="DigiSpot eBay store home" title="DigiSpot eBay store home">
  <area shape="rect" coords="539,0,400,41" href="http://stores.ebay.co.uk/Digi-Spot/About-us.html" alt="About Digispot" title="About DigiSpot">
  <area shape="rect" coords="699,0,539,41" href="http://stores.ebay.co.uk/Digi-Spot/Delivery.html" alt="Delivery information" title="Delivery information">
  <area shape="rect" coords="845,0,699,41" href="http://stores.ebay.co.uk/Digi-Spot/Returns.html" alt="Returns information" title="Returns information">
    <area shape="rect" coords="985,0,845,41" href="http://stores.ebay.co.uk/Digi-Spot/Contacts.html" alt="Contacts information" title="Contacts information">
</map> </div>

  <div style="overflow:hidden;">
    <div style="float:left; width: 661px; text-align: center;">
        <img border="0" src="http://www.gvcdigital.co.uk/images/graphic/description.png" width="232" height="81" title="Product description"><br /><p style="text-align: left; margin-left: 10;">[[Description]]</p></div>
    <div style="float:left; width: 324px; text-align: center;">
        <div style="color: #ffffff; background-color:#6b8861; font-size : 18px;" title="Product title">[[Title]]</div>
        <div style="border:1px dotted #6b8861; text-align:center; width: 324px; background-color:#ffffff;" title="Product picture">[[Picture1]]</div>
        <div style="width: 324px; color: #000000; font-size : 18px;" title="In stock: [[QtyToList]]">In stock: <b>[[QtyToList]]</b></div>
        <div style="width: 324px; color: #801010; font-size : 35px;" title="Product Price">Price: [[BuyItNowPrice]]</div>
    </div>
</div>


<div style="clear: both; text-align: center; width:200px; margin: 0 auto; background-color:#58794c; color: #ffffff; font-size : 28px; border-top:1px dotted #015811; border-left:1px dotted #015811; border-right:1px dotted #015811;">Postage</div>
<div style="width:985px; margin: 0 auto; background-color:#58794c; color: #efda5d; border-bottom:1px dotted #015811; border-left:1px dotted #015811; border-right:1px dotted #015811;"><p style="text-align: left; margin-left: 10;">Available shipping type/It's price/Additional cost for this product:<br />[[ShippingService1]]/[[ShippingServiceCost1]]/[[ShippingServiceAdditionalCost1]]<br />[[ShippingService2]]/[[ShippingServiceCost2]]/[[ShippingServiceAdditionalCost2]]<br />[[ShippingService3]]/[[ShippingServiceCost3]]/[[ShippingServiceAdditionalCost3]]<br />[[ShippingService4]]/[[ShippingServiceCost4]]/[[ShippingServiceAdditionalCost4]]<br />More information about products delivery you will find by clicking <a href="http://stores.ebay.co.uk/Digi-Spot/Delivery.html">here</a>.</p></div>
<br />
<div style="text-align: center; width:200px; background-color:#558b40; color: #ffffff; font-size : 28px; border-top:1px dotted #015811; border-left:1px dotted #015811; border-right:1px dotted #015811;">Return</div>
<div style="width:985px; margin: 0 auto; background-color:#558b40; color: #efda5d; border-bottom:1px dotted #015811; border-left:1px dotted #015811; border-right:1px dotted #015811;"><p style="text-align: left; margin-left: 10;">Product must be returned within [[ReturnWithin]] to this adress <b>[[ReturnAddress]]</b>. For return shipping pays <b>[[ReturnShipPaid]]</b>.<br /> More information about returning products you will find by clicking <a href="http://stores.ebay.co.uk/Digi-Spot/Returns.html">here</a>.</p></div>
<br />
<div style="text-align: center; width:200px; margin: 0 0 0 0; background-color:#66ac4a; color: #ffffff; font-size : 28px; border-top:1px dotted #015811; border-left:1px dotted #015811; border-right:1px dotted #015811;">Payment</div>
<div style="width:985px; margin: 0 auto; background-color:#66ac4a; color: #efda5d; border-bottom:1px dotted #015811; border-left:1px dotted #015811; border-right:1px dotted #015811;"><p style="text-align: left; margin-left: 10;">Product price is <b>[[FixedPrice]]</b><br />Additional payment instructions for this product: [[PaymentInstructions]]</p></div>

<div style="text-align: center; width:985px; margin: 0 auto;">
    <img border="0" src="http://www.gvcdigital.co.uk/images/graphic/buttom.png" width="524" height="42" title="DigiSpot - Supplier of Electrical and Related Products at Low Price"></div>
  </div>
</body>

以下是它的样子(标记为红色的探测区域): enter image description here

这是什么问题?我知道这是“小”但我无法找到问题:s 此问题仅出现在Chrome浏览器中。

3 个答案:

答案 0 :(得分:1)

当您应用保证金时会出现空格,因此只需删除margin: 10;

答案 1 :(得分:1)

尝试将"margin-top:0"添加到<p>标记,因为浏览器会添加默认的上边距,因为它们是块级div内的内联元素,它们会强制包含div之外的边距#39; S

答案 2 :(得分:0)

内联风格......我感受到了痛苦! :P

确定您的问题是 p标记

<p style="text-align: left;">
Available shipping type/It's price/Additional cost for this product:

通过在此处添加边距来进行修复:

<p style="text-align: left; margin: 0px;">

快乐编码:)

相关问题