By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,632 Members | 1,340 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,632 IT Pros & Developers. It's quick & easy.

how to extent divs to full height of viewport

P: n/a
dear group,

as nobody answered my recent posts (maybe they were too complicated) i
just ask you to help me on a rather simple issue: how can i stretch
divs to the full height of the viewport (in my case the browser
window)?

any help will be appreciated.
--
kind regards,
tomasio
"describing an issue reveals the way to solve it"
Jul 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
tomasio <da****@jan.et> wrote:
how can i stretch
divs to the full height of the viewport (in my case the browser
window)?


body{margin:0;padding:0}
html,body,div{height:100%}

--
Spartanicus
Jul 20 '05 #2

P: n/a
Spartanicus <me@privacy.net> schrieb:
tomasio <da****@jan.et> wrote:
how can i stretch
divs to the full height of the viewport (in my case the browser
window)?


body{margin:0;padding:0}
html,body,div{height:100%}

thank you spartanicus,

finally an answer ; )

I applied the CSS above to a test-html document, and it stretches to
full height of the viewport. Unluckily I am now confronted with two
issues:
1) There is an unwanted large amount of space between the signature
after the first article and the header of the second.
2) the margins to the left and right of the textbox (made them with a
background picture) - and at least in mozilla - its background color
don't stretch to the bottom of the viewport.

Is absolute positioning causing this behaviour?

I provided example html
(http://tomasio.laudatio.com/jobs/Cla...st_height.html) and css
(http://tomasio.laudatio.com/jobs/Cla...est_height.css) and a link
to the inital site (with the correct spacing between articles,
signatures and headers), which can be found here:
http://tomasio.laudatio.com/jobs/Cla..._template.html.

this is my final request for now, because i can finally go on with
building the site i am commissioned after solving the problems above
mentioned.
--
kind regards,
tomasio
"describing an issue reveals the way to solve it"
Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.