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

How to make it so its stays in centre not on left?

Hi,

How can I make this webpage so its in center when you zoom out ?

http://codepen.io/anon/pen/PwZPqZ

1 Answer

it depends!

Are you looking to keep the orange bar stretching all the way across?

Yes, i want it 100% but the contents on middle. What I do it seems not to work.

Something like this? I removed the 'c' class from your nav > ul.

http://codepen.io/anon/pen/PwZGgx

To me, you were having a bit of a nightmare because you had nested containers with the same class 'c'. The background is on your nav element which is 100%.

I'm probably guilty of it too, but be kind to your future self and give proper names to your classes! What does 'c' mean? Try inner-container, or restricted-container. Something that makes more sense ;-p

I'll look at it when I'm on pc. Thank you.

It means instead of writing container you write cc for short or instead leftbar lBar xd

Yeah but when someone else comes a long and looks at your code, they have no idea what anything means ;)