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 trialJeremiah Swift
3,277 PointsAdjust the Profile Page and Header: float problems
In the responsive.css I formatted the nav element for the desktop (min-width: 660px) version of the site. The nav element does not seem to stay inside the header now. The portfolio, about and contact pages all seem to float around it on the left. Please advise, thank you. Jeremiah
Nick Nish
7,304 PointsHey @Jeremiah if @Rendy's answer didn't clear things up could you post your code using the Markdown formatting? (If you're unfamiliar with the formatting look below the forum textbox and see Markdown Cheatsheet).
There could be a lot of reasons why your layout is breaking, and I want to give you the solution that fits your challenges and skillset for the timebeing.
3 Answers
Jason Anello
Courses Plus Student 94,610 PointsHi Jeremiah,
It sounds like your header is partially collapsing. In an earlier part of the project back in main.css the header was floated left.
Check your header rule in main.css and see if you have float: left
header {
float:left;
/* other styles */
}
Jeremiah Swift
3,277 PointsI did the code exactly as the tutorial shows, but commented out the background to see what's going on:
nav { /* background: none;*/ float: right; font-size: 1.125em; margin-right: 5%; text-align: right; width: 45%; }
Here is the actual link to the workspace site: http://web-8wopf4kafh.treehouse-app.com/index.html
Jeremiah Swift
3,277 PointsJason, that worked. I had the left float commented out for some reason. Thanks!
Rendy Ho
2,452 PointsRendy Ho
2,452 PointsDo You did it like this ?
CMIIW