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 trialAlyssa Kackza
1,773 PointsMargin
For the about and contact page, I resize the window and the entire header shifts down and I have white space above everything. It basically shifts the entire email down when I add the float element to anything in the header.
Alyssa Kackza
1,773 Points<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Nick Pettit | Designer</title>
<link rel="stylesheet" href="css/normalize.css">
<link href='http://fonts.googleapis.com/css?family=Changa+One|Open+Sans:400italic,700italic,400,700,800' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/main.css">
<link rel="stylesheet" href="css/responsive.css">
</head>
<body>
<header>
<a href="index.html" id="logo">
<h1>Nick Pettit</h1>
<h2>Designer</h2>
</a>
<nav>
<ul >
<li><a href="index.html" >Portfolio</a></li>
<li><a href="about.html" >About</a></li>
<li><a href="contact.html" class="selected">Contact</a></li>
</ul>
</nav>
</header>
<div id="wrapper">
<section id="primary">
<h3>General Information</h3>
<p>I am not currently looking for new design work, but I am available for speaking gigs and similar engagements. If you have any questions, please don't hesitate to contact me!</p>
<p>Please only use phone contact for urgent inquiries. Otherwise, Twitter and email are the best way to reach me.</p>
</section>
<section id="secondary">
<h3>Contat Details</h3>
<ul class="contact-info">
<li class="phone"><a href="tel://555-6425">555-6425</a></li>
<li class="mail"><a href="mailto:nick@example.com">nick@example.com</a></li>
<li class="twitter"><a href="http://twitter.com/intent/tweet?screen_name=nickrp">@nickrp</a></li>
</ul>
</section>
<footer>
<a href="http://twitter.com/nickrp"><img src="img/twitter-wrap.png" alt="Twitter Logo" class="social-icon"></a>
<a href="http://facebook.com/nickpettit"><img src="img/facebook-wrap.png" alt="Facebook Logo" class="social-icon"></a>
<p>© 2014 Nick Pettit.</p>
</footer>
</div>
</body>
</html>
and css:
@media screen and (min-width: 480px) {
/*******************
TWO COLUMN LAYOUT
*******************/
#primary {
width: 50%;
float:left;
}
#secondary {
width: 40%;
float:right;
}
/*******************
PAGE: PORTFOLIO
*******************/
#gallery li {
width: 28.3333%;
}
#gallery li:nth-child(4n) {
clear:left;
}
/*******************
PAGE: ABOUT
*******************/
.profile-photo {
float: left;
margin: 0 5% 80px 0;
}
}
@media screen and (min-width: 660px) {
/*******************
HEADER
*******************/
nav{
background:none;
float:right;
font-size:1.125em;
margin-right:5%;
text-align:right;
width:45%;
}
#logo {
float:left;
margin-left:5%;
width:45%;
}
h1{
font-size: 2.5em;
}
h2{
font-size: 0.825em;
margin-bottom:20px;
}
header {
border-bottom: 5px solid #599a68;
margin-bottom:60px;
}
}
1 Answer
Joe Hartman
20,881 PointsI notice you left text-align: left out of your #logo declarations. Not sure if this will solve your problem but give it a try.
Alyssa Kackza
1,773 Pointsthanks for pointing that out but unfortunately it didn't solve the problem :(
evan rost
Courses Plus Student 13,971 Pointsevan rost
Courses Plus Student 13,971 Pointshey alyssa. can you post your code