From the course: Tailwind CSS Essential Training

Unlock the full course today

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

Divide

Divide - CSS Tutorial

From the course: Tailwind CSS Essential Training

Start my 1-month free trial

Divide

- [Instructor] So divides, allow you to easily set up borders between elements. Now, this is really cool, this is one of the things that I really love about Tailwind. You can specify a border and then an X or Y direction, and then an amount, and you also have this option to use the reverse property, which is a little bit strange. I think we need an example for this one, so we'll hit this try it thing. So notice that I have a number of elements here. Right, all these elements, they're not lists, so they don't have any lines, now you could try to put a border underneath all this, but you know that what it would do, is it would actually add a border at the bottom, which you don't want, you just want things in between. So this is a super convenient class, and if these were a side-by-side for some reason, so if say, instead of divs, if you had spans in here. And here's where you want to use borders because you don't get this one…

Contents