Use the following code to declare width
, height
, padding
, etc.:
Viewport Unit
vw
vh
vmin
vmax
Then, if needed:
Small viewport unit
svw
svh
Large viewport unit
lvw
lvh
Dynamic viewport units
dvw
dvh
Use minimum height to solve the problem of main-container.
<div class="main-container bg-slate-500 min-h-3/6 w-8/12 sm:w-8/12 sm:min-h-3/6 md:w-7/12 md:min-h-2.5/6 lg:w-5/12 lg:min-h-2.5/6 xl:w-4/12 xl:min-h-2.5/6 2xl:w-3.5/12 2xl:min-h-4/6 flex justify-center items-center py-20">