Home
CSS
CSS Height/Width
Tryit: Using max-height and min-height
Run ❯
Get your
own
website
Result Size:
625 x 534
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <head> <style> div { max-height: 600px; min-height: 400px; background-color: powderblue; } </style> </head> <body> <h2>Set the max-height and min-height of an element</h2> <p>Resize the browser window to see the effect.</p> <div>This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text.</div> </body> </html>