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

CSS

DEEPIKA MARAM
DEEPIKA MARAM
4,491 Points

CSS Layout Project: How to push header to left and nav list to right?

/* Tried this but it doesn't work */ .name { text-align: left; }

.main-nav li { text-align: right; }

/But when I use main header container everything moves to left but then I'm unable to move the list items to the right. Is there a way to fix this?/

.main-header { text-align: left; }

kathryn armitage
kathryn armitage
12,185 Points

Have you tried using the float property?

1 Answer

DEEPIKA MARAM
DEEPIKA MARAM
4,491 Points

using float works. But I was wondering on how its done with display property. @kathryn armitage