改变Div的保证金不会产生影响?

时间:2012-12-27 19:40:41

标签: html css

我正在尝试更改页脚边距,使其扩展到网页的宽度,相反,它似乎仍然受到我添加到#content部分的50px左/右边距的影响。我在这里遗失了什么属性,所以我可以删除页脚部分内容边距的影响?

HTML

<div id="wrapper" />
      <div id="header" />
      <div id="mast"><img src="http://i1256.photobucket.com/albums/ii488/terafanb/guildwars2/26.png" height="99" width="774=" /></div>
      <div id="below-mast" />
      <div id="left" class="column"><img src="http://i157.photobucket.com/albums/t60/Dragon_Aleph/fantasy_warrior_23022-800x600.jpg" height="297" width="226" border="0" alt="Crusader Army" /></div>
      <div id="center" class="column"><img src="http://i157.photobucket.com/albums/t60/Dragon_Aleph/fantasy_warrior_23022-800x600.jpg" height="297" width="400" border="0" alt="Crusader Army" /></div>
      <div id="right" class="column"><img src="http://i157.photobucket.com/albums/t60/Dragon_Aleph/fantasy_warrior_23022-800x600.jpg" height="297" width="139" border="0" alt="Crusader Army" /></div>
      <div></div>
      <div id="content" />
      <p>
      <div class="Heading">Forward Exchange *</div>
      $500.00 - collected upon the closing of the Relinquished Property.
      $500.00 - collected upon closing of each Replacement Property purchased.
      * Special credits may apply - Call Us.<br /></br>
      <div id="we-pay">
        <br />
        <div class="Heading">We pay interest</div>
        </br>
        We provide full disclosure of the fees involved in the transaction in the Exchange Agreement. Our customers are entitled to receive earned interest based on the First National Bank of Durango Investment Money Market rate, from the time when the Relinquished Property funds are initially deposited. Interest does not accrue on those funds withdrawn during the first 30 calendar days after the funds are deposited in the Exchange Trust Account. Also, interest does not accrue if customer elects to have exchange funds held at First National Bank of Durango in an Unlimited FDIC insurance non-interest bearing account (available through December 31, 2012)
      </div>
      <br />
      <div class="Heading">
        Safe-Harbor Reverse Exchange <br />
        <h2>We charge the following fees:</h2>
      </div>
      <div id="prices">$2,500.00 – Title holding fee<br /> 
        $500.00 – LLC fee<br />
        $200.00 – Monthly Rent<br />
        Plus – Forward Exchange fees<br />
        <br />
      </div>
      <div id="note">
        <p>Note: If any improvements need to be made to the parked property,
          being held by the EAT ( Exchange Accommodator Titleholder )
          there will be an additional fee of 1% of the final sales price to Taxpayer.
        </p>
        <div>
          <br /></br>
          <div id="disclaimer">Fees are subject to change without prior notice</p></div>
        </div>
        <div id="footer">
          <a href="index.html">Home</a>
          <strong>l</strong> <a href="whatIs1031.html">What is a 1031 Exchange?</a> <strong>l</strong> <a href="exchangeRequ.html">
          1031 Exchange Requirements</a> <strong>l</strong> <a href="typesOfExchange.html">Types of Exchanges</a> <br />
          <div id="Second-Half">              
            <a href="howToStart.html">How to get Started</a> <strong>l</strong> 
            <a href="whyCLX.html">Why CLX?</a><strong>l</strong> <a href="resources.html">Resources</a> <strong>l</strong> <a href="fAQs.html">FAQs</a> <strong>l</strong> <a href="fees.html">Fees</a> 
            <a href="contactUs.html">Contact Us</a>
          </div>
        </div>
      </div>

CSS

*{box-sizing:border-box;}
#wrapper {margin-left:auto; margin-right:auto;width:774px;}
#below-mast { width:774px; overflow:hidden; }
#left {height:297px; width:29%; margin:4px;margin-left:0px;}
#center{height:297px; width:51%; margin:4px;}
#right {height:297px; width:17%; margin:4px;}
#left,  #center, #right { float:left;margin-bottom:50px;}
#content{overflow:;margin:0px;margin-top:100px;font-family:Arial, Helvetica, sans-serif;margin-right:50px;margin-left:50px;}
.Heading{font-size:19px;font-weight:bold;text-align:center; text-decoration:underline}
.Heading>h2{font-size:13px;text-decoration:none}
#we-pay{font-size:13px}
#we-pay>.Heading{font-size:20px;text-decoration:none;}
#prices{text-align:center; font-size:20px;}
#note{text-align:center;}
#disclaimer{font-size:13px; text-align:center; font-weight:bold;font-style:italic; }
#footer{margin-right:-50px;margin-left:-50px;}
#footer,a:link{font-family:Helvetica, sans-serif;color:#300000; margin-top:50px;}
#Second-Half{margin-left:auto; margin-right:auto;width:450px;}

以下是我在Code Pen上的代码链接,以方便您使用 http://codepen.io/Austin-Davis/pen/rLeEi

3 个答案:

答案 0 :(得分:1)

您可以使用以下代码修复您的错误:

#footer { margin: 0; position: absolute; left: 0; width: 100%; }

请结帐:http://codepen.io/joe/pen/uBikf

PS:我给了页脚一个灰色的背景用于测试目的。

答案 1 :(得分:0)

对不起家伙我只是在我的#note部分错过了一个结束</div>,使内容部分成为页脚的一部分,从而通过css无效更改页脚。

答案 2 :(得分:0)

另一个解决方案是将页脚移到#wrapper div之外。 另外请检查你的HTML ..它在许多地方被破坏,修复css问题可能是不可能的;)

例如。你有很多自我标记“”(无效) 你也缺少关闭身体标签,没有现有的标签“”等等。