我无法让我的div填充整个浏览器的宽度,它只会填满你所见屏幕的宽度。如果你缩小浏览器并向右移动滚动条,你会清楚地看到它是有问题的。表面上看起来像是正常的,但实际上是有缺陷的。我尝试过使用min-width、width 100%、margin和padding 0。
http://jsfiddle.net/BdQvp/159/
<html>
<head>
<title>Untitled Document</title>
<style type="text/css">
body { margin: 0; padding: 0;background-color:#00F;}
div {margin: 0; padding: 0;background-color:#F00;}
span{font-size:30px;}
</style>
</head>
<body>
<div>hello</div>
hellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohello.<br><br><br><br>
<span>
watch as u shrink the window and move the scroll bar to the right that the red div stops and does not fill the width of the browser only the width of the screen............ <br> <br>
How do I get the red div to fill the width regardless if the browser window is shrunk?
</span>
</body>
</html>