maximt Posted June 28, 2011 Report Share Posted June 28, 2011 (edited) есть div с фиксированными высотой и шириной.внутри 3 дива - заголовок, контент, футер.<div class="container"><div class="header">title</div><div class="content">item content</div> <div class="footer">toolbar</div></div>нужно сделать, чтобы футер был снизу, а контент занимал все свободное пространство между заголовком и футером.прижал футер к низу так:.container{ position:relative;}.footer{ position: absolute; bottom: 0;}но с контентом не могу сообразить как..updзабыл один важный момент: div с контентом должен быть с overflow:hidden. т.е. содержимое дива не должно растягивать див-контейнер. Edited June 28, 2011 by maximt Quote Link to comment Share on other sites More sharing options...
0 Bonzash Posted June 28, 2011 Report Share Posted June 28, 2011 (edited) html { height: 100%;}body { width: 100%; height: 100%;}#wrapper { width: 1000px; margin: 0 auto; min-height: 100%; height: auto !important; height: 100%;}#header { height: 150px;}#content { padding: 0 0 100px;}#footer { width: 1000px; margin: -100px auto 0; height: 100px;}<div id="wrapper"> <div id="header"></div> <div id="content"></div></div><div id="footer"></div>Удачи. Edited June 28, 2011 by Bonzash Quote Link to comment Share on other sites More sharing options...
0 buddah Posted June 28, 2011 Report Share Posted June 28, 2011 (edited) Bonzash, ты хоть задачу читал?Удачи. Главный блок фиксированный и неясно, сколько занимает хедер.maximt, вот решение: http://jsfiddle.net/etKjV/4/ Edited June 28, 2011 by buddah Quote Link to comment Share on other sites More sharing options...
0 maximt Posted June 29, 2011 Author Report Share Posted June 29, 2011 maximt, вот решение: http://jsfiddle.net/etKjV/4/спасибото, что нужно Quote Link to comment Share on other sites More sharing options...
Question
maximt
есть div с фиксированными высотой и шириной.
внутри 3 дива - заголовок, контент, футер.
нужно сделать, чтобы футер был снизу, а контент занимал все свободное пространство между заголовком и футером.
прижал футер к низу так:
но с контентом не могу сообразить как..
upd
забыл один важный момент: div с контентом должен быть с overflow:hidden. т.е. содержимое дива не должно растягивать див-контейнер.
Edited by maximtLink to comment
Share on other sites
3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.