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

div alignment

Hi, I have done a quick draft of a website. div for header/menu div for main div for right side bar div for footer

http://www.1800gotblinds.com/index-draft.php

My question is why is the right side bar not aligning right with the header div above. It keeps going all the way to the right.

Thanks in advance Donna

2 Answers

Hi Donna,

The table that is inside of your header has 60px margin on the left and right. This makes your header bigger than what the content is.

Your right sidebar is technically aligned with the right edge of your header it's just that it extends 60px past the actual content in it.

You can either remove the 60px on the table in your header or give your right sidebar 60px right margin. This will allow it to align with the right edge of the content.

It looks like you're doing layout with tables here. I would highly recommend that you start completing some of the projects here on treehouse so you can get this site updated to modern standards.

These days, tables should only be used for tabular data.

Thank you Jason, I appreciate you taking the time to look at this. Yes, I am trying to move away from tables and learning more about dreamweaver cc with the CSS designer.

I have developed this page without using tables (besides header/rightsidebar which I will return to and fix later). http://www.1800gotblinds.com/products.php The main div which as the product images are allowing the rightsidebar to float up right.. awesome! However on this page it is not: http://www.1800gotblinds.com/about.php

Thanks so much!!!! If you can assist I would appreciate it.

Donna