How can you make, for example, three background images so that the piece was at the bottom (not repeated), in the middle (so that it lengthened depending on the size of the content) and above, a static background image. Layout DIV-s.
2 answers
I propose to make three nested divas (here 50px is the height of the background pictures of the top and bottom)
<style type="text/css"> #content { height: auto; min-height: 300px; } #bg1 { padding-top: 50px; background: transparent url('/images/bg-top.png') left top no-repeat; } #bg2 { padding-bottom: 50px; background: transparent url('/images/bg-bottom.png') right bottom no-repeat; } #content { background: #ffffff url('/images/bg-middle.png') center center repeat; } </style> <div id="bg1"> <div id="bg2"> <div id="content"> content </div> </div> </div> |
<div class="header"></div> <div class="body"></div> <div class="footer"></div> Something like this. Well, fix at least fixed, even though%. It seems nothing complicated and should work.
|