@mattstuddert
Posted
Your solution looks awesome, Jun! Just a quick heads up that the vh
units are currently throwing off the screenshot. I'd recommend only using the vh
unit in very specific circumstances, as it can have unintended consequences, especially on short viewports. Instead, I'd let the height on the inner content dictate the height of the parent. It's much better to use margin
and padding
on elements than forcing the height
directly.
Keep up the great work!
@JunYuHuang
Posted
@mattstuddert Thanks Matt for the tip! Didn't realize using vh units was not recommended for most cases. Margin and padding aside, what do you think about using percentages instead?
@mattstuddert
Posted
@JunYuHuang I'd recommend avoiding setting the height
of an element wherever possible, regardless of the unit. This is especially true for elements that contain a lot of content. It's fine in very specific instances, but should be mostly avoided.