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.

Design HTML Email Design Coding HTML Email Building Common Design Patterns

Elizabeth Naughton
Elizabeth Naughton
374 Points

Scaffold Issues

Why use id over class in the scaffold section? I need to have the text on the left and my logo image on the right. What is the code to make the two rows go into the 2 columns shown (side-by-side)?

2 Answers

Id's load faster than classes. Plus it has a priority over classes. The thing is, id's are for unique elements on your website. If you have 2 id's with the same styling, you should use classes, because it's a style common to other elements.

You can have to columns side by side using "display: inline-block", or floating the elements. You should consider reading about the clear property first. In your case I would go with floating the text to the left, and the logo to the right.

Hope that helps!