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

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

Oscar Mauricio Lancheros Murillo
Oscar Mauricio Lancheros Murillo
3,608 Points

Why my contact page is showing all along width of site, i Need it to show in two columns in larger screens:

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Mauricio Lancheros | Ingeniero de Sistemas</title>
    <link rel="stylesheet" href="css/normalize.css">
    <link href='http://fonts.googleapis.com/css?family=Montserrat:400,700|Ubuntu:400,700,400italic,700italic' 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>Mauricio Lancheros</h1>
        <h2>Ingeniero de Sistemas y Telecomunicaciones</h2>
      </a>
    <nav>
      <ul>
        <li><a href="index.html">Portafolio</a></li>
        <li><a href="about.html">About US</a></li>
        <li><a href="contact.html" class="selected">Contacto</a></li>
      </ul>         
    </nav>
    </header>
    <div id="wrapper">
    <section id= "primary">
      <h3>Información General</h3>
      <p>Interesado en aprender todo lo que tiene que ver con desarrollo de websites, apps y bases de datos. Actualmente interesado en  Wordpress como herramienta para implementar eCommerce de la mano de Woocommerce</p>
       <p>Interesado en participar en proyectos de implementaciones de eCommerce y desarrollo web</p>
    </section>
    <section id= "secondary">
      <h3>Información de contacto</h3>
      <ul class="contact-info">
        <li class="phone"><a href="tel:3002738357">3002738357</a></li>
        <li class="mail"><a href="mailto:lucalan66@gmail.com">lucalan66@gmail.com</a></li>
        <li class="twitter"><a href="http://twitter.com/intent/tweet?screen_name=lanchco">@lanchco</a></li>
      </ul>

    </section>

    <footer>
      <a href="http://www.twitter.com/lanchco"><img src="img/twitter-wrap.png" alt="Twitter Logo" class="social-icon"></a>
      <a href="http://www.facebook.com/lanchco"><img src="img/facebook-wrap.png" alt="Facebook Logo" class="social-icon"></a>
      <p>&copy; 2014 Mauricio Lancheros.</p>
    </footer>
    </div>
  </body>
</html>

And 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) {

}

I think this will help you my friend.

  1. I noticed that your footer needs a clear. So if you add to responsive.css the following: footer {clear: both;} This will separate your footer from secondary.

  2. You may have forgotten to add a percentage sign the width for primary. So after the 50 in the width for primary, just add % symbol.

1 Answer

Oscar Mauricio Lancheros Murillo
Oscar Mauricio Lancheros Murillo
3,608 Points

Thanks Ali, footer clear is already done at main.css file, thank you so much!