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 Build a Simple PHP Application Listing Inventory Items Displaying All Products

Simon Flachs
Simon Flachs
3,863 Points

can't get CSS to work in the 'displaying all products' video. <Solved>

found my mistake.. missing a > after h1..

For some reason i can't get to CSS to kick in when following the instructions in the displaying all products part. I've added and modified the classes just as in the video, but the shirts won't lign up in rows of three. Instead they're just vertically ligned up, one after the other..

any help would be greatly appreciated!

Here is part of my code: ?><?php $pageTitle = "Mike's Full Catalog of Shirts"; $section = "shirts"; include('inc/header.php'); ?>

    <div class="section shirts page">

        <div class="wrapper">

            <h1>Mike&rsquo;s Full Catalog of Shirts</h1

            <ul class="products">
                <?php foreach($products as $product){ ?>
                <li>
                    <a href="#">
                        <img src="<?php echo $product["img"]; ?>" alt="<?php echo $product["name"];?>">
                        <p>View Details</p>
                    </a>            
                </li>
                <?php } ?>
            </ul>

        </div>

    </div>

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