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
Paul Edwards
325 PointsBootstrap Issues involving container.
I have downloaded bootstrap to experiment with.
I wanted to change the container width to 1000px
.container {
width: 1000px;
}
in my own mystyles.css page. When I make this change, Bootstrap no longer allows my text to flow on to the next line and behave responsively. Does anyone know the reason for this?
Thanks in advance.
2 Answers
Paul Edwards
325 PointsThanks Guil, this works for the responsive behaviour mentioned above but for some reason when I do this the text in my Jumbotron element, despite sitting within the container, sits outside of the 1000px container.
here is my css for the jumbotron component:
.jumbotron {
background-image: url('../img/main_background.jpg');
margin-top: 80px;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
And this is my html
<div class="jumbotron">
<div class="container">
<div class="row">
<div class="col-sm-12 landing-content">
<h1>Le Tour 2014</h1>
<p class="lead">A look ahead to the 2014 Tour de France</p>
</div>
</div>
</div>
</div>
Any help would be greatly appreciated.
(The .landing-content class just provides some extra padding to the top and bottom of the jumbotron text)
Paul Edwards
325 PointsAlthough I still have no idea why the jumbotron would not abide to the width set in my my-styles.css page, I managed to solve the issue by customising bootstrap and editing the container width to 1000px, then redownloading.
Thanks Guil.
Guil Hernandez
Treehouse TeacherGuil Hernandez
Treehouse TeacherHey Paul Edwards,
Try
max-width: 1000px;. :)