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

HTML How to Make a Website Responsive Web Design and Testing Website Testing

Rouillie Wilkerson
Rouillie Wilkerson
10,419 Points

How do I center my portfolio header and get the scroll bar off the bottom?

My finished portfolio didn't look as cool as Nic's, so I fiddled with the header padding a bit. Now I have this scroll bar at the bottom of my document. So If anyone want see the entire header, they can scroll right or left. How do I fix this?

1 Answer

Kristaps Vecvagars
Kristaps Vecvagars
6,193 Points

Difficult to say without seeing the code, however, if a scrollbar is displayed, that means that there is at least 1 element on your page that overflows the width or height of the page. You should inspect your page to determine, which element is the culprit and adjust its width at least. To simply hide the scrollbar, you can add overflow: hidden to your CSS. As for horizontal centering, you can do it with margin: 0 auto or justify-content: center, if it's a flex container.