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 trialChris Nicholson
1,108 PointsContact Images not moving with Column layout
After building my responsive.css and breaking it out into two columns under Contact Details, my mail icon and twitter icon stay to the left they do not move with the secondary column. How do I get them to move? Have I missed something in the walk through?
My code for Responsive.css
@media screen and (min-width: 480px) {
/*************************************
TWO COLUMN LAYOUT
**************************************/
#primary {
width: 50%;
float: left;
}
#secondary {
width: 40%
float: right;
}
} @media screen and (min-width: 660px) { }
My code for Main.css (Contact section only)
/*************************************
Page: CONTACT
**************************************/
.contact-info {
list-style: none;
padding: 0;
margin: 0;
font-size: 0.9em;
}
.contact-info a {
display: block;
min-height: 20px;
background-repeat: no-repeat;
background-size: 20px 20px;
padding: 0 0 0 30px;
margin: 0 0 10px;
}
.contact-info li.mail a {
background-image: url('../img/mail.png');
}
.contact-info li.twitter a {
background-image: url('../img/twitter.png');
}
My code for Contact.html (section for columns only) <div id="wrapper"> <section id="primary"> <h3>General Information</h3> <p>Currently studying to become a designer of epic proportions.</p> <p>Please use twitter and email to contact me.</p> </section>
<section id="secondary">
<h3>Contact Details</h3>
<ul class="contact-info">
<li class="mail"><a href="mailto:nicholcd@gmail.com">nicholcd@gmail.com</a></li>
<li class="twitter"><a href="http://twitter.com/intent/tweet?screen_name=technicalnich">@technicalnich</a></li>
</ul>
</section>
<footer>
<a href="http://twitter.com/technicalnich"><img src="img/twitter-wrap.png" alt"Twitter Logo" class="social-icon"></a>
<a href="http://facebook.com"><img src="img/facebook-wrap.png" alt"Facebook Logo" class="social-icon"></a>
<p>© 2014 Chris Nicholson.</p>
</footer>
</div>
1 Answer
Chris Nicholson
1,108 PointsI was able to fix this. Please note this is not in the training walk through. Under main.css in the Page: Contact section, I added float: left to the .contact-info a {}. Once I added this, it aligned properly in my column.
Aaron Mckenzie-Hunte
10,741 PointsAaron Mckenzie-Hunte
10,741 PointsHi Chris, I have just done this but it no longer keeps my contact information listed vertically it now does it horizontally when expanding the page, did you have this issue also?
Aaron Mckenzie-Hunte
10,741 PointsAaron Mckenzie-Hunte
10,741 PointsHi Chris,
I have now resolved this, I had omitted the semicolon after the width 40% in the responsive.css file.