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

Charlie Thomas
40,856 PointsHTML Help! Grid positioning not working!
I have this code http://cdpn.io/EtJBs
But when the code is run the the div is below the div with the id upcoming but it should be next to it. Any help on how to move my two divs next to each other would be greatly appreciated.
Many Thanks, Charlie Thomas
2 Answers

Ankur Jain
4,395 PointsHi Charlie,
I'm not entirely sure how your grid.css is structured but I believe it looks like you're using the 960 grid. I modified your first div and removed the id of wrapper and changed the class from "wrapper" to "container_12"
Your updated code: http://codepen.io/anon/pen/ypLHn Grid CSS Used: http://960.gs/css/960.css
960.gs Demo: http://960.gs/demo.html

Kevin Korte
28,149 PointsIs there any way you can put this in a codepen or something? That would help.
The first thing that comes to mind is using floats, and make sure they have enough room to site side by side if there is a container.

Charlie Thomas
40,856 PointsSorry I'm new how do I put it in a codepen

Ankur Jain
4,395 PointsVisit: http://codepen.io/pen/
Input your HTML in one tab, CSS in the other and select save.
Once you're done copy and paste the new URL here! (something like this: http://codepen.io/anon/pen/BJsCG)
Charlie Thomas
40,856 PointsCharlie Thomas
40,856 PointsThank you. One last thing on my new code: http://cdpn.io/jJIys Upcoming Events doesn't start on the same line as main. Is there anyway to fix this?
Many Thanks Charlie
Ankur Jain
4,395 PointsAnkur Jain
4,395 PointsYou're using an H3 tag there, by default all block level elements have margin's assigned to them.
If you want to remove the top margin, all you have to do is remove the top margin from the H3.
hint: target the parent div ("upcoming") then the h3 so your rule only applies to that specific instance of H3
Try it out, and if you run into problems let me know I'll help.
Charlie Thomas
40,856 PointsCharlie Thomas
40,856 PointsThank \you so much it all worked!
Many Thanks Charlie
Charlie Thomas
40,856 PointsCharlie Thomas
40,856 PointsAlso if you have time could you help me center my navigation. http://cdpn.io/EtJBs
Ankur Jain
4,395 PointsAnkur Jain
4,395 PointsSure not a problem, I've centered it for you.
http://codepen.io/anon/pen/qIJEf
I'm a bit short for time but take a look at "inline-block" - http://reference.sitepoint.com/css/display to give you a better understanding of what I did.
Charlie Thomas
40,856 PointsCharlie Thomas
40,856 PointsThank You