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!
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
I-Mei Wu7,305 Points
"Offsetting Columns" is not working.
I add as follows: <div class="col-lg-6 offset-lg-4"> also I try <div class="col-lg-6 col-offset-lg-4"> both of them are not working. bootstrap version is email@example.com
Dakota Gillette5,320 Points
Hi, the documentation for Bootstrap 4 has changed. Make sure you use the updated CDN links, and give this a try:
<div class="col-lg-6 offset-lg-3">
Yashwanth Yash10,947 Points
The workspaces are updated with Alpha 2 of bootstrap and the new changed classes in docs are Alpha 3 release. You need to update the CDN link <head> tag and JS in the document. It works for me after updating them
Erik Nuber20,629 Points
The first one is the correct setting. Could you please provide more of your code.
hamad Al Ali3,893 Points
I tried "col-lg-6 col-lg-offset-3" and it's working perfectly.
Not sure why "col-lg-6 offset-lg-4" doesn't work, even though I've taken it from the bootstrap docs.
hope this works for you
Still seeing the same issue with either classes:
<div class="col-lg-6 offset-lg-4"> <div class="col-lg-6 col-offset-lg-4">
Seems to work fine outside Team Treehouse.
Benjamin Veenema9,780 Points
<div class="col-lg-6 offset-lg-3"></div> Will center your content correctly. The problem you were having was you used
offset-lg-**4** which sets it too far to the right. Bootstrap docs is correct at this moment link
Justin Eaton6,133 Points
Thank you Dakota. <div class="col-lg-6 col-lg-offset-3"> worked only up to a width of 990px. Those saying it still works may be having partial success. But try a wider screen to be sure.
<div class="col-lg-6 offset-lg-3"> with bootstrap alpha 4 worked for me at all widths.
Dan Levin7,741 Points
Here is the problem and answer.
The code you get from the page for offset http://v4-alpha.getbootstrap.com/layout/grid/#example-offsetting-columns is - col-lg-6 offset-lg-3
for it to work in the demo it needs to be this col-lg-6 col-lg-offset-3