Show Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>CSS Set minimum Height of an Element</title> <style> div { height: 200px; min-height: 300px; background: #bbb3ff; } p { min-height: 100px; background: #eee8aa; } </style> </head> <body> <div>The minimum height of this div element is set to 300px, so it can't be smaller than that.</div> <p>Enter some more line of text to see how it works.</p> </body> </html>