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 trial

HTML How to Make a Website Responsive Web Design and Testing Build a Three Column Layout

My responsive.css is not creating my columns

Somehow I can't make the columns. Please let me know what am doing wrong on my html or css

Thanks, :)

<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Dalexis Peguero | Designer </title> <link rel="stylesheet" href="normalize.css"> <link href='http://fonts.googleapis.com/css?family=Changa+One|Open+Sans:400italic,700italic,800italic,400,700' rel='stylesheet' type='text/css'> <link rel="stylesheet" href="main.css"> <link rel="stylesheet" href="responsive.css"> </head> <body> <header> <a href="index.html" id="logo"> <h1>Dalexis Peguero</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 when I feel confident with my skills. </p> <p>Please reach me with email or facebook when it's not an emergency, but if you need an urgent consultation just call me.</p> </section> <section id="secondary"> <h3> Contact Details </h3> <ul class="contact-info"> <li class="phone"><a href="tel:555-5555">555-5555</a></li> <li class="mail"><a href="mailto:dalexispeguero@gmail.com">dalexispeguero@gmail.com</a></li> <li class="twitter"><a href="http://twitter.com/intent/tweet?screen_name=nickrp">@Dpeguero</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/dalexisp"><img src="img/facebook-wrap.png" alt="facebook logo" class="social-icon"></a> <p>Ā© 2014 Dalexis Peguero. </p> </footer> </div> </body> </html>

@media screen and (min-width:480px) { { /********************** TWO COLUMN LAYOUT *********************/

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

}

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

} }

@media screen and (max-width:480px) {

}

}

3 Answers

HTML

<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Dalexis Peguero | Designer </title> <link rel="stylesheet" href="normalize.css"> <link href='http://fonts.googleapis.com/css?family=Changa+One|Open+Sans:400italic,700italic,800italic,400,700' rel='stylesheet' type='text/css'> <link rel="stylesheet" href="main.css"> <link rel="stylesheet" href="responsive.css"> </head> <body> <header> <a href="index.html" id="logo"> <h1>Dalexis Peguero</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 when I feel confident with my skills. </p> <p>Please reach me with email or facebook when it's not an emergency, but if you need an urgent consultation just call me.</p> </section> <section id="secondary"> <h3> Contact Details </h3> <ul class="contact-info"> <li class="phone"><a href="tel:555-5555">555-5555</a></li> <li class="mail"><a href="mailto:dalexispeguero@gmail.com">dalexispeguero@gmail.com</a></li> <li class="twitter"><a href="http://twitter.com/intent/tweet?screen_name=nickrp">@Dpeguero</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/dalexisp"><img src="img/facebook-wrap.png" alt="facebook logo" class="social-icon"></a> <p>Ā© 2014 Dalexis Peguero. </p> </footer> </div> </body> </html>

Hi Dalexis,

You are almost there! Looks like you made a syntax error. You have two opening curly brackets - correct this to one curly bracket that opens your media query.

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

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

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

}

Thanks! :D