The short answer is “No”. You can’t give your div a fixed height and and expect it to expand dynamically at the same time. The best you could do is to fix a minimum height by changing height: 2000px; to min-height: 2000px;.