Having trouble making a background image (line) span screen width with
horizontal scroll
I need to create a red line that spans the entire screen.
http://jsfiddle.net/k86gc/
<!DOCTYPE html>
<head>
<style type="text/css">
#redBar{ width: 100%; height: 10px; z-index: -1; margin-top: 80px;
background: #D2232A;}
#heading{ width: 768px; margin-left: auto; margin-right: auto; margin-top:
80px;}
</style>
</head>
<body>
<div id="redBar"></div>
<div id="heading"> Heading</div>
</body>
</html>
Notice that when you scroll to the right with the horizontal scroll bar
the red bar does not show up.
No comments:
Post a Comment