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
Shams Nelson
2,888 PointsHow can I layer divs? (put one behind the other)
I'm trying to get the black part on the top of this page to be behind the green part on the right. This is so that when you shrink the browser page horizontally, it doesn't look all funky.
What would be the best way to do this?
All the styling and html is on this one page so if you just check the source code it should show you everything. (also a bunch of stuff is messed up I'm sure so if you see anything you'd like to point out please do - this is my first real practice page) Thanks!
2 Answers
Tommy Gebru
30,164 PointsNice page, I believe this will be covered in css layout techniques chapter of the web design track, if you would like the top part of your page to become two columns contained in the same rows.
Shane Meikle
13,188 PointsI think you are going to want to tackle the CSS deep dive for what you are needing.
Basically, if you are looking for a fluid looking layout when you shrink the screen, you will want to use something like a percentage based layout instead of a fixed width. I am not sure exactly what you are looking for with the black box being behind the green on the right hand side, but if you are looking to 'stack' things on a webpage, you will want to look at messing with the z index.
I highly recommend going through the deep dive on CSS before going forward as you may want to start over once you have learned those techniques.