Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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.