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.

CSS

Portfolio navigation <ul> hyperlinks suddenly wrapping

On my portfolio heading, just under the logo, I have navigation links (portfolio, about, contact.) This wasn't happening before; suddenly when I make the browser window smaller to imitate a mobile or tablet browser window, the hyperlinks go from being inline, to the contact hyperlink falling below the other two links. I'm so confused and haven't been able to figure out what I did wrong! How do I keep my links lined up regardless of browser size (also without the text cutting off)?

Sorry I have not shared my code with this question...I also do not understand how to do this.

1 Answer

Hi Sketch Goddess,

If the width of your links exceeds the width of your browser, they will automatically be pushed down, to accommodate the space below. It's likely that this is what is happening here.

So if you want them to stay in line, you'd have to mess around with your widths/margins/paddings to reduce the overall width of the ul.

To post your css code, by the way, you need to place three backticks (`) + css (no spaces) before your code. Then three backticks after the code. If you want to paste HTML, just replace 'CSS' with 'HTML'. You should see a link under the question box called 'markdown worksheet' that has more details on this.

Hope that helps,

Ede

That does help!! Thanks so much, Ede!

By the way, I just checked out your portfolio and your websites are absolutely beautiful.