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.


marcell gibbs
marcell gibbs
3,639 Points

Display is not the same

in the displaying all items video the images are displayed from left to right but when i preview my code its from top to bottom can anyone figure out why



$pageTitle = "Full Catalog"; $section = null;

if(isset($_GET["cat"])){ if($_GET["cat"]== "books"){ $pageTitle = "Books"; $section = "books"; }else if($_GET["cat"] == "movies"){ $pageTitle = "Movies"; $section = "movies"; }else if($_GET["cat"] == "music"){ $pageTitle = "Music"; $section = "music"; } } include('inc/header.php'); ?>

<div class="section catalog page">

<div class= "wrapper">

<h1><?php echo $pageTitle; ?></h1>

<ul clas="items">

  <?php foreach($catalog as $item){
      echo "<li><a href='#'><img src ='"
          . $item["img"] . "' alt='"
          . $item["title"] . "' />" 
          . "<p> View Details</p>"
          . "</a></li>";

} ?>




<?php include('inc/footer.php'); ?>

1 Answer

You have a typo in spelling class completely


<ul clas="items">

should be:

<ul class="items">
marcell gibbs
marcell gibbs
3,639 Points

aw man, thanks! I knew it was a CSS issue I just couldn't find where! So focused on the PHP! lol