I need to make a div have a certain height, it has a repeating image in it and I want it to take up the entire screen no matter what the users screen resolution is. Height auto depends on the content so do I need to use javascript in order to achieve my goal? Or can I use something with a “clear:both;” property on it in order to always stretch the div to the bottom? I would really like to avoid javascript.
Share
As long as the parent container (like
bodyorhtml) has100% height, then thedivshould also. SoExample: http://jsfiddle.net/jasongennaro/Jm8Mt/
Of course, your
divwould have aclass… example was just for show