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 a Website Responsive Web Design and Testing Adjust the Profile Page and Header

My <nav> bar only has a size of 800px * 24 px, I don't know how to adjust it for it to go across the page...

It should be a bar that takes the full width of the page, but now it is just a small island floating on the right with my tabs on top. I tried "width" in css but it doesn't work.

Please help. Thanks!!

Charles Smith
Charles Smith
7,575 Points

Can you post your CSS and index.html, please?

2 Answers

Erik McClintock
Erik McClintock
45,783 Points

Liwei,

Have you tried setting your nav bar (and any container that it might be in) to have a width of 100%?

Erik

Hi Erik,

I have adjusted the width and now it is across the screen. But now I am puzzled why the teacher set it to 45% in the video then, and why it didn't shrink after he set it up.

Erik McClintock
Erik McClintock
45,783 Points

Liwei,

When Nick sets the nav bar to 45% width and floats in to the right in the video, he is doing so to allow for it and the logo to be on the same line in the header. This does not make the nav bar take up the entire width of the screen.

What is it that you are trying to accomplish, exactly? If you post your code and clearly tell us your goal, we can more easily assist you in figuring out what to do!

Erik