让红色左边也有。谢谢
<style>
#s0{width:300px;height:500px;margin:0 auto;background-color:grey}
#s1{width:100%;height:50px;background-color:red}
</style>
<div id='s0'>
<div id='s1'>
</div>
</div>
#s0{width:100%} 宽度100%,不要设置固定值
不给宽度不就行了,div是块级元素,自动占满一行