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

PHP

marcell gibbs
marcell gibbs
3,744 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

<?php

include('inc/data.php');

$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>";

} ?>

</ul>

</div>

</div>

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

1 Answer

You have a typo in spelling class completely

This:

<ul clas="items">

should be:

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

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