Show Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>CSS Set Height Range for an Element</title> <style> div { min-height: 300px; max-height: 500px; background: #eee8aa; } </style> </head> <body> <p><strong>Note:</strong> The minimum height of the following div element will be 300px, and it can stretches vertically up to 500px. Enter few lines of text inside the div element to understand how it works.</p> <div></div> </body> </html>