I'm quite new to CSS3. I've read other questions but I'm not sure they cover my case, so please be patient :)
I have this example page:
<html>
<head>
<style type="text/css">
body { background-color: black; margin: 0; }
#main { background-color: red; width: 60%; height: 100vh; margin: auto; }
#header { background-color: white; width: 100%; height: 25%; max-height: 100px; }
#article { background-color: orange; width: 100%; height: 55%; }
#footer { background-color: blue; width: 100%; height: 20%; max-height: 80px; }
</style>
</head>
<body>
<div id="main">
<div id="header"></div>
<div id="article"></div>
<div id="footer"></div>
</div>
</body>
</html>
There's one additional mandatory behaviour I have to implement, plus an optional one.
The mandatory
As you can see yourself, once the browser window gets quite high, #header and #footer correctly stop to grow, leaving their height to the background red #main div. What I need is that #article gets this space, therefor always "pushing" the #footer to the lower border of the browser screen.
The optional
The layout itself resizes horizontally without any limit, but the #article div has setted a background image that does fade on its left and right sides. To be more precise, it's a 1000x1 image fading in from coords (1,1) to (100,1) and fading out from (901,1) to (1000,1), vertically repeated to cover the height of #article. How can I get the effect that this image stretches only in its non-fading area (so that the faded borders would not get stretched)? Can I get it without any extra div (as in that case, the mandatory behaviour would reapeat it self horizontally)?
Thank you so much :)