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 trialRonnelle Torres
5,958 PointsHi! Please help with the navigation issue! I've attached a screenshot here
My navigation has an issue with floating. To better understand, please see screenshot below:
https://drive.google.com/file/d/0B8kwZLc-yGOIeGh4YktTR203ZTA/view?usp=sharing
4 Answers
Billy Bellchambers
21,689 PointsThe issue with the primary and secondary content on your contact page I believe is down to this
@media screen and (min-width:480px) {!important /*this "!important" text seems to be messing with the media query and preventing the css for #primary being applied remove this and it should work "*/
/********************************
TWO COLUMN LAYOUT
********************************/
#primary {
width:50%;
float:left;
}
#secondary {
width:40%;
float:right;
}
/********************************
PORTFOLIO PAGE
********************************/
/********************************
FOR IMAGE LIST WIDTH
3*5 = 15
100% - 15% = 85%
85 / 3 = 28.3333333333
********************************/
#gallery li {
width:28.3333%;
}
#gallery li:nth-child(3n+1) {
clear:left;
}
/********************************
About page
********************************/
.profile-photo {
float:left;
margin:0 5% 100px 0;
}
}
Hope that solves it now for you
Billy Bellchambers
21,689 PointsThe problem you are reporting with the nav in your picture is just a breaking point with your responsive design.
The code below should help rectify the issue by tweaking your media query screen size.
I also tweaked the floats at larger screen resolutions so the nav falls up into the header.
@media screen and (min-width:680px) {
/********************************
Header
********************************/
header {
height: 100px; /*delete if you don't want nav in header*/
}
#logo {
float:left; /*delete if you don't want nav in header*/
width:50%; /*delete if you don't want nav in header*/
}
nav {
float: right;
background:none;
font-size:1.125em;
margin-right: 5%;
text-align:right;
width:45%; /*delete if you don't want nav in header*/
}
}
LaToya Legemah
12,600 Pointshow can I get html code to show up in my answers? I'm trying " '''html"' but its giving me garbage..
Billy Bellchambers
21,689 Pointsyou need to enclose the code into the tags eg
``html
code here
``
of course use the 3(```) rather than the 2 I've used to demonstrate.
LaToya Legemah
12,600 PointsThanks
Ronnelle Torres
5,958 PointsWoahh! This worked! Thanks! Billy! I have another inquiry though, if you don't mind. :)
Billy Bellchambers
21,689 PointsGlad it worked.
What' up?
Ronnelle Torres
5,958 PointsHere it is Billy
The float of the contact details is mysteriously not parallel with the general info. don't know what I did wrong :(
When it's on the desktop version this problem occurs.
https://drive.google.com/open?id=0B8kwZLc-yGOIdXBPN2ZIWVVlOEE
Here's my code :
Billy Bellchambers
21,689 PointsAs with your previous question a picture alone isnt too helpful in us lending assistance please provide code or a snapshot.
Instructions from my last comment on your other question again:
Can you share your HTML and CSS code so we can see exactly what the issue is.
If your working on workspaces create a snapshot at top right of workspaces page and share the link.
Thanks
Ronnelle Torres
5,958 PointsSorry! :) Here's my code. Thanks Billy! :)
It's on the responsive css file. on the navigation part of the header :)
LaToya Legemah
12,600 PointsFound the problem.
You have a closing } that's stopping the rest of the css file.
In the responsive.css line 41, remove the extra " } "
.profile-photo { float:left; margin:0 5% 80px 0; } "" } <----- Gotta go.. ""
Let me know your result. :)
Billy Bellchambers
21,689 PointsThat's the closing brace for the media query not an extra }.
If it were not in a media query this could have caused problems but not the one reported with the nav issue.
Ronnelle Torres
5,958 PointsI appreciate the Help Latoya! :)
Ronnelle Torres
5,958 PointsRonnelle Torres
5,958 PointsOh God! Thank you Billy! You're awesome! Cheers! :D