Content
` |
| `w-1/4` | Set width to one quarter of parent element | `Content
` |
| `w-1/2` | Set width to 100% of parent element | `Content
` |
| `w-screen` | Set width to viewport width | `Content
` |
| `w-64` | Set width to 16rem (256px) | `Content
` |
| `w-auto` | Width adapts to content | `Content
` |
Use utility classes like w-px, w-1, w-64 to set fixed widths for elements.
## Example
w-96
w-80
w-64
w-48
w-40
w-32
w-24
[Try it Β»](#)
Use utility classes like w-full, w-1/2, w-2/5 to set percentage-based element widths.
## Example
w-1/2
w-1/2
w-2/5
w-3/5
w-1/3
w-2/3
w-1/4
w-3/4
w-1/5
w-4/5
w-1/6
w-5/6
w-full
[Try it Β»](#)
Use w-screen to make elements span the entire viewport width.
Content
` |
| `h-1/2` | Set height to half of parent element | `Content
` |
| `h-screen` | Set height to viewport height | `Content
` |
| `h-auto` | Height adapts to content | `Content
` |
Use utility classes like h-px, h-1, h-64 to set fixed heights for elements.
## Example
h-96
h-80
h-64
h-48
h-40
h-32
h-24
[Try it Β»](#)
Use h-full to set the element's height to 100% of its parent element, provided the parent element has a defined height.
YouTip