Complete the code to set the height of the div to 16 (4rem) using Tailwind CSS.
<div class="h-[1] bg-blue-500"></div>
h-4 instead of h-16 for 4rem height.The class h-16 sets the height to 4rem (16 * 0.25rem) in Tailwind CSS.
Complete the code to make the div take full viewport height using Tailwind CSS.
<section class="[1] bg-green-300"></section>
h-full which means 100% of parent height, not viewport.h-auto which lets height adjust to content.The class h-screen sets the element's height to 100% of the viewport height.
Fix the error in the code to set the div height to 12 (3rem) using Tailwind CSS.
<div class="h-[1] bg-red-400"></div>
h-3 thinking it means 3rem instead of 0.75rem.The class h-12 sets height to 3rem (12 * 0.25rem). Using h-3 sets height to 0.75rem, which is too small.
Fill both blanks to set the div height to 24 (6rem) and make it responsive with full height on small screens.
<div class="[1] sm:[2] bg-yellow-300"></div>
h-24 without responsive prefix for small screens.h-screen which sets viewport height, not container height.The class h-full makes the div take full height of its container on small screens. The class sm:h-24 sets height to 6rem on screens medium and larger.
Fill all three blanks to create a div with height 32 (8rem), minimum height full viewport, and maximum height 96 (24rem).
<div class="[1] min-h-[2] max-h-[3] bg-purple-400"></div>
h- prefix on max height.min-h-full instead of min-h-screen for viewport height.h-32 sets height to 8rem. min-h-screen sets minimum height to full viewport height. max-h-96 sets maximum height to 24rem.