From the course: Bootstrap 4 Essential Training

Unlock the full course today

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

Sizing utilities

Sizing utilities - Bootstrap Tutorial

From the course: Bootstrap 4 Essential Training

Start my 1-month free trial

Sizing utilities

- [Teacher] Let's take a look at another set of utilities for sizing elements. Now these are actually a pretty simple formula although there's quite a few options. In here, you're going to specify one of the dimensions that you want to control and then you can specify an amount. But it gets a little bit strange because not all these apply to everything. So for example, you can specify the width or the height with an amount you can say, for example, w dash 100, that means make the width of this element 100% of the container size or of course, 25 would be 25%, et cetera, et cetera. I'm sort of disappointed there's no 33% because I think I would use that more, but these are the options. There's also the size that you can use of auto here as well so you can set the width of the element to auto. The remainder of the values though can only be used with the 100 value. So for example, you can say viewport width, which means the width of the current device that you're using. Usually that's the…

Contents