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!

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 trial

HTML How to Make a Website Responsive Web Design and Testing Responsive Web Design

Gareth Fenney
Gareth Fenney
1,903 Points

Cannot get two column layout

So I had my CSS set up a little differently to the main instruction video as I have used it to design my own portfolio. Now I am attempting to make my 1 column contact page change to 2 columns when the media is over 480px, as per the instructional video. However, adding the primary and secondary classes makes no difference at all. Can someone please help? Relevant code as follows:


<div id="wrapper"> <section class="contact" id="primary"> <h3>General Information</h3> <p>If you are interested in hiring me for a photography assignment or purchasing any of my work, please don't hesitate to contact me!</p> </section> <section class="contact" id="secondary"> <h3>Contact Details</h3> <ul class="contact-info"> <li class="mail"><a href ="mailto:garethfenney@hotmail.com">garethfenney@hotmail.com</a></li> <li class="twitter"><a href ="http://twitter.com/intent/tweet?screen_name=fwsurfer">@FWSurfer</a></li> </ul> </section>


/********************* PAGE: CONTACT **********************/


padding: 0 30px; margin: 60px auto 0; text-align: center; width: 80%; max-width: 940px; }

.contact-info { list-style: none; padding: 0; margin: 0 auto; text-align: center; font-size: 0.9em; }

.contact-info a { display: inline-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'); }


@media screen and (min-width 480px) {

/********************* TWO COLUMN LAYOUT **********************/

#primary { width: 50%; float: left; }

#secondary { width: 40%; float: right; }


1 Answer