Kinetic Pulse
  • Home
  • Services
  • Portfolio
  • Blog
  • Terms
  • Contact

Use CSS to make a div the maximum height of the window

April 21, 2011

I’ve often struggled to make a div that fits the maximum height of the current browser window (without resorting to harcoding a height in pixels) And putting height:100% on the divs stylings appears to do nothing.

Then I stumbled across a post which tells me how to do it:


html {
height : 100%;
}
body {
height : 100%;
}
#yourDiv {
height : 100%;
}

(obviously #yourDiv being the id or class of the div your working with)

Woo hoo – one happy bunny here!
Thanks to  http://forum.boagworld.com/discussion/1556/maximize-a-div-to-the-windows-height/p1

Share

Facebook Google+ Twitter Pinterest Email

Back to Blog

Testimonials

I like it.  I like it a lot !!!

 You have interpreted what I wanted to achieve perfectly considering what you have to play with i.e not redoing the whole thing in the process.

Fiona Simmons-MooreSouth Gloucestershire Parents & Carers
Thank you for all of your hard work its looks fab and I am over the moon with it!
Amanda MercerAmanda Mercer Ceramics
Absolutely fantastically professional web developer – I would highly recommend!!! Thank you so much Kinetic Pulse!
Tania MarstonDoris Designs
Thanks so much for all your work on this, really appreciated. It’s come on in leaps and bounds since you took over.
Pete KewRedwood Strip Curtains
It’s been fab working with you – we love the site and certainly going to recommend you!
James DaviesThirty Eight Degrees North
Thank you guys so much for all that you’ve done helping us to create a really awesome website!! We get such great feedback – everyone loves it & we couldn’t be prouder! Look forward to working with you again soon!
Wild Thyme PlantsWild Thyme Plants
Amazing and brilliant, Kinetic Pulse have lifted a dream to reality, Highly recommended and great if you are total novice, they know their stuff…Thanks again
Annie LindridgeSalt Yourself Out

Copyright 2025 Kinetic Pulse