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
Eivind Kristoffersen
Courses Plus Student 31 PointsGetting jumbotron to strech around javascripts and tables
I can't seem to get jumbotron to stretch/fit to my page when i have javascripts and or tables in it. Even though the <div class="jumbotron"> is set ouside all the cointainers on the screen and the styling as the height set to 100%
5 Answers
Timothy coxon
18,633 PointsYou have a height attribute on all the parents? html, body etc etc?
Eivind Kristoffersen
Courses Plus Student 31 PointsNo. It is a ruby on rails application so the parents are gouped in this file:
<!DOCTYPE html>
<html>
<head>
<link rel="shortcut icon" href="wave.ico" type="image/ico">
<title>InstaWaves</title>
<%= include_gon %>
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
<%= csrf_meta_tags %>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
</head>
<body class='<%= controller.controller_name %>'>
<%= render partial: "elements/navbar" %>
<%= bootstrap_flash %>
<%= yield %>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
</body>
</html>
Timothy coxon
18,633 PointsFairly sure I remember something about if you want "height:100%;" then all the parent elements need to have a height defined also...
html, body {margin:0;padding:0;height:100%;}
http://stackoverflow.com/questions/21357238/css-height-100-percent-not-working
((it was height you wanted?))
Eivind Kristoffersen
Courses Plus Student 31 PointsYes, it was height.
That did not work either. The jumbotron stretches to 100% screen height but doesn't wrap around the table.
Timothy coxon
18,633 PointsHmm table looks like it needs a clearfix.. you have a url I can view this at? tricky to work it out from just a screenie..
Eivind Kristoffersen
Courses Plus Student 31 PointsI have not deployed it yet, so can't link to webapp to you sorry .
Eivind Kristoffersen
Courses Plus Student 31 PointsThe problem with jumbotron nok wrapping to 100% of screen is the same on multiple pages, no matter if there is a table there or not.
Think it is the javascripts that messes it up. Pages with only google maps api has the same problem
Eivind Kristoffersen
Courses Plus Student 31 PointsEivind Kristoffersen
Courses Plus Student 31 Pointshad trouble pasting the code into the question so added it here: http://www.codeshare.io/LeD6Z