The Wayback Machine - https://web.archive.org/web/20231128022919/https://www.geeksforgeeks.org/tailwind-css-sizing-complete-reference/
Open In App
Related Articles

Tailwind CSS Sizing Complete Reference

Improve Article
Improve
Save Article
Save
Like Article
Like

Tailwind CSS is a highly customizable, low-level CSS framework that gives you all of the buildings blocks that you need. Tailwind CSS Sizing that set the size of elements like setting element width, height, min-max width, and min-max height.

Tailwind CSS Class

Description

Example

Width It sets the width of the text, images.
Try

Min-Width It defines the minimum width of an element.
Try

Max-Width It defines the maximum width of an element.
Try

Height It sets the height of an element.
Try

Min-Height It sets the minimum height of an element.
Try

Max-Height It sets the maximum height of an element.
Try

Below example will give you a brief idea about the Sizing of Tailwind CSS:

Example:

HTML




<!DOCTYPE html>
<head>
    <link href=
"https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css"
          rel="stylesheet">
</head>
  
<body class="text-center mx-4 space-y-2">
    <h1 class="text-green-600 text-5xl font-bold">
        GeeksforGeeks
    </h1>
    <b>Tailwind CSS MIn-Width Class</b>
    <div class="w-24 h-16 min-w-full md:min-w-0
                bg-green-400 rounded-lg text-white">
    </div>
</body>
  
</html>


Output:

Tailwind CSS Sizing Complete Reference

Tailwind CSS Sizing Complete Reference

Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Last Updated : 04 Aug, 2023
Like Article
Save Article
Similar Reads
Related Tutorials