I'm trying to set a div's height to 30% of the viewport height and I would very much like to scale it when the height of the viewport changes.
I tried setting min-height: 30%; height:30% but it is not working.
I took a look at JQuery's height(); but I just don't know how to get started.
Thanks.
This is basically Liam Bailey's answer, but with a thirty_pc() that should be both faster and more concise:
If you like it, please still accept Liam's, but upvote mine. :)
This one works 100% for viewport height of any div, section that has this class using Jquery. Use additional function to adjust height to 30% currently it is 100% please promote if you like it.