From the course: Tailwind CSS Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Width and height

Width and height - CSS Tutorial

From the course: Tailwind CSS Essential Training

Start my 1-month free trial

Width and height

- [Instructor] So there's a number of classes that help you control the metrics, essentially the width and height of different items. And there's a ton of options for most of these. This is one of the richest set of classes that we have. The first one that I'll show you is the width. The width starts off by using a w and then a specific size. And there are a ton of sizes, as you can see. They're kind of divided into two different sections, actually three. You have the sizes that go from zero to 96. These are sizes that are related to the root m of the page with four being one rem which translates to about 16 pixels in most browsers. It's relative to the root size of your browser. And four just happens to be a root m of one which is again 16 pixels. And then you have all these other sizes around it, all the way up to 96. And then you have these fractional width which are like one half, one third, et cetera, et cetera as you…

Contents