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

Development Tools Building Websites with Bootstrap 3

Ulises Calvo
Ulises Calvo
2,233 Points

Offsets affecting all screen sizes

Does anyone happen to know why when I set an offset for a column at a specific screen size (breakpoint) it immediately affects the other breakpoints or screen sizes of my layout? The only way I managed to fix this issue was by specifying offset-0 for all of the other screen sizes that I don't want to have an offset, but the div ends up bloated with a bunch of classes. Why does this happen? isn't something like col-md-offset-3 supposed to be informing the browser to that at that screen size (not another) the column must have an offset of 3 columns? What am I missing here? Thanks in advance!

1 Answer

Brett Smith
Brett Smith
4,261 Points

According to the bootstrap website:

Grid classes apply to devices with screen widths greater than or equal to the breakpoint sizes, and override grid classes targeted at smaller devices. Therefore, e.g. applying any .col-md-5 class to an element will not only affect its styling on medium devices but also on large devices if a .col-lg-5 class is not present.

Basically the class affects whichever screen size you're targeting and all screen sizes that are larger.

Ulises Calvo
Ulises Calvo
2,233 Points

That clarifies my question, thank you so much Brett, that was helpful!