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

General Discussion

Attempting to change DIV heights based on usable window area

I am trying to change the div heights based on innerHeight in javascript. For some reason I have an error in the console that says "TypeError: titleBar is null." Stuck on this one and not sure what I have done incorrectly. Any help would be appreciated.

// Here is the code in codepen: http://codepen.io/BryanSCraig/pen/kFmEK

Thanks so much!

Bryan

1 Answer

Mike Morales
Mike Morales
19,833 Points

Bryan - I haven't spent a whole lot of time with JavaScript, yet? However, in your CodePen, I did notice you placed a semicolon after each nbsp; in your div elements. I did removed them, and two bars appeared at the top of the page.