Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS Bootstrap 4 Basics (Retired) Getting to Know Bootstrap 4 Creating a Simple Page

Jake Ford
Jake Ford
9,230 Points

Why do we use "xs" in text-xs-center

<div class="container text-xs-center">

Does "xs" stand for xtra small? Why do we use xs instead of md or lg or nothing at all?

1 Answer

Ethan Rivas
Ethan Rivas
9,979 Points

XS Is for Extra small devices like phones less than 544px, you can see all the other sizes here:

http://v4-alpha.getbootstrap.com/layout/grid/#grid-options

Jake Ford
Jake Ford
9,230 Points

But in this example we weren't really trying to center things only on extra small devices, but all screen sizes. This is why I don't understand why xs comes into play.

Ethan Rivas
Ethan Rivas
9,979 Points

Jake Ford That's because it "Center aligned text on all viewport sizes.", that means that your text is going to be aligned in all devices from XS to LG :), if you use the text-md or text-lg your text is going to be aligned for md and large or only large, but no for the xs ones.

But i'm not sure that those even exist :p

Jake Ford
Jake Ford
9,230 Points

Ahh ok so xs sets it for all breakpoints, not just xs. I get it, thanks Ethan Rivas