儿童Div扩展到整个页面

时间:2011-11-19 21:23:18

标签: html css

在这里查看我的页面:

REMOVED

我有一个很大的红色div占据整个内容区域。我计划让它横向延伸到整个页面。我将使用旋转木马效果让我的客户一次注册一个约会。 div是另一个div的孩子,但我需要它比它宽。中心内容区域是静态宽度,以margin:auto;为中心。有没有办法让我的孩子div像整个页面一样宽,希望只使用css?

2 个答案:

答案 0 :(得分:1)

**<div id="servicesteps"> </div>**

是红色div只是将其从<div clas="shadow" id="content">

中删除

并将其置于页脚div之上,它应该可以正常工作

你的最终身体标签看起来像这样

    <div id="header"><div id="headpadding"></div><a href="index.html"><div class="headbutton noselect">Home</div></a><a href="services.html"><div class="headbutton noselect">Services &amp; Pricing</div></a><a href="details.html"><div class="headbutton noselect">service details</div></a><a href="get.html"><div class="headbutton noselect">Request Service</div></a><div class="headbutton noselect">Contact</div></div>
    <div id="content" clas="shadow"><div class="noselect" id="logo"></div><div id="buttonarea"><a style="display:table-cell;" href="details.html"><div class="noselect greenbutton"><span class="buttontitle">GET THE DETAILS</span>Learn about what we do before you come over!</div></a><span style="width:51px;display:table-cell;">&nbsp;</span><a style="display:table-cell;" href="get.html"><div class="noselect bluebutton "><span class="buttontitle">REQUEST SERVICE</span>Get your computer serviced in the next 48 hours!</div></a></div><!-- InstanceBeginEditable name="content" -->
    <div class="fold noselect"><span style="background-color:#4F69FF;">Request Service</span></div>
    <table id="currentstatus">

    </table>

    <!-- InstanceEndEditable --></div>
<div id="servicesteps">

    </div>
<div id="footer">Dade Lamkins (DadeFixMyComputer.com) Copyright 2011.</div>

答案 1 :(得分:-1)

如果我理解正确,你会希望从一侧到另一侧一直伸展。这就是我要做的事情:

width: 100%;

这应该适用于您的问题。

相关问题