Click here to navigate the course.

Drag the edges to resize the window.

In Projects, you can keep track of your progress as you go throught the tasks. Check each item as you complete it!

Code Editor
Web Browser
Learn

You can also limit the minimum and maximum height of an element.

  1. min-height — ensures a minimum height for an element's box.
  2. max-height — ensures a maximum height for an element's box.
p { min-height: 150px; max-height: 300px; }

In the example above, the height of all paragraphs will not shrink below 150 pixels and the height will not exceed 300 pixels.

What will happen to the contents of an element if the max-height property is set too low for that element? It's possible that content will overflow outside of the element, resulting in content that is not legible.

Report a Bug
If you see a bug or any other issue with this page, please report it here.