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 trialMikaela Schaefer
817 PointsWhen introducing two columns, the contact icons will not float right.
When I introduced my two column layout to my portfolio Contact page, my contact image icons will not float right with the contact information.
Mikaela Schaefer
817 Points<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Mikaela Schaefer | Novice</title>
<link rel="stylesheet" href="css/normalize.css">
<link href='http://fonts.googleapis.com/css?family=Lobster|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>Mikaela Schaefer</h1>
<h2>Novice</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 always looking for new volunteer opportunities, particularly when it comes to the Autism spectrum. I am also a American Red-Cross certified Lifeguard and always available for lifeguarding gigs. Please feel free to contact me with any questions.</p>
<p>Email is the best way to reach me, although I can be contacted by phone in case of urgent need.</p>
</section>
<section id="secondary">
<h3>Contact Details</h3>
<ul class="contact-info">
<li class="phone"><a href="tel:541-653-5999">541-653-5999</a></li>
<li class="mail"><a href="mailto:kaela_anne@hotmail.com">kaela_anne@hotmail.com</a></li>
<li class="facebook"><a href="https://www.facebook.com/kaela.schaefer">Find me on Facebook!</a></li>
</ul>
</section>
<footer>
<a href="http://www.twitter.com">
<img src="img/twitter-wrap.png" alt="Twitter Logo" class="social-icon"></a>
<a href="http://www.facebook.com/kaela.schaefer">
<img src="img/facebook-wrap.png" alt="Facebook Logo" class="social-icon"></a>
<p>© 2014 Mikaela Schaefer.</p>
</footer>
</div>
</body>
</html>```
```css
@media screen and (min-width: 480px) {
/****************
TWO COLUMN LAYOUT
****************/
#primary {
width: 50%;
float: left;
}
#secondary {
width: 40%
float: right;
}
/****************
3 * 5 = 15
100 - 15 = 85
85 / 3 = 28.333333333333333
****************/
/****************
PAGE: PORTFOLIO
****************/
#gallery li {
width: 28.333333%;
}
#gallery li:nth-child(4n) {
clear: left;
}
}
@media screen and (min-width: 660px) {
}```
1 Answer
Jason Anello
Courses Plus Student 94,610 PointsHi Mikaela,
You're missing a semicolon at the end of your width declaration.
#secondary {
width: 40% /* Missing semicolon here */
float: right;
}
This would cause the browser to ignore both the width
and the float
declarations.
Sean T. Unwin
28,690 PointsSean T. Unwin
28,690 PointsCould you post your html and css, please.