Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

CSS

Byron Wall
Byron Wall
2,632 Points

portfolio page not expanding from two to three columns

Hey! When expanding the gallery page, it does not expand from two columns to three. This is my responsive.css:

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

  /***************************************************
   page contacts: two column layout
  ****************************************************/

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

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


   /***************************************************
   page my cats: three column layout
  ****************************************************/

  #gallery li {
    width= 28.3333%;
  }

  #gallery li:nth-child(4n){
    clear: left;
  }
}
@media screen and (min-width: 660px){

  }

This is my index.html:

<!DOCTYPE html>
<html>
 <head>
   <meta charset = "utf-8">
   <title>Byron Wall | Cat Enthusiast</title>
   <link rel="stylesheet" href="css/normalize.css">
   <link href='https://fonts.googleapis.com/css?family=Changa+One|Open+Sans:400,400italic,700,700italic,800' rel='stylesheet' type='text/css'>
   <link rel="stylesheet" href="css/main.css">
   <link rel="stylesheet" href="css/responsive.css">
   <style>

   </style>
 </head>
 <body>
  <header>
    <a href = "index.html" id="logo">
      <h1>Byron Wall</h1>
      <h2>Cat Enthusiast</h2>
    </a>
    <nav>
      <ul>
        <li><a href = "index.html" class="selected">my cats</a></li>
        <li><a href = "about.html">about</a></li>
        <li><a href = "contact.html">contact</a></li>
      </ul>
    </nav>
  </header>
  <div id="wrapper">
    <section>
      <ul id="gallery">
        <li>
          <a href="img/bhdftfierce.jpg">
            <img src="img/bhdftfierce.jpg" alt="">
            <p>Bathands and Dr. Funtimes being fierce!</p>
          </a>
        </li>
        <li>
          <a href="img/dftsurf.jpg">
            <img src="img/dftsurf.jpg" alt="">
            <p>Dr. Funtimes getting all misty-eyed.</p>
          </a>
        </li>
        <li>
          <a href="img/dfthoodie.jpg">
            <img src="img/dfthoodie.jpg" alt="">
            <p>Dr. Funimes stylin' in his hoodie.</p>
          </a>
        </li>
        <li>
          <a href="img/bhhoodie.jpg">
            <img src="img/bhhoodie.jpg" alt="">
            <p>Bathands killin' it out on the town.</p>
          </a>
        </li>
        <li>
          <a href="img/layabouts.jpg">
            <img src="img/layabouts.jpg" alt="">
            <p>A couple of layabouts enjoying an evening out.</p>
         </a>
        </li>
         <li>
          <a href="img/bhornament.jpg">
            <img src="img/bhornament.jpg" alt="">
            <p>Bathands lookin' good!</p>
          </a>
        </li>
      </ul>
    </section>
    <footer>
      <a href="http://twitter.com/byrondwall"><img src="img/twitter-wrap.png" alt="twitter logo" class="social-icon"></a>
      <a href="http://facebook.com/byron.d.wall"><img src="img/facebook-wrap.png" alt="facebook logo" class="social-icon"></a>
      <p>&copy; 2016 Byron Wall.</p>  
    </footer>
  </div>
 </body>
</html>

1 Answer

Byron Wall
Byron Wall
2,632 Points

I feel silly,

gallery li { width= 28.3333%; }

should be

gallery li { width: 28.3333%; }

Also, I realise this question isn't tagged correctly. My bad.