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
JAMES SANDER
1,347 PointsPage has lost CSS reference
I am making my way through the PHP Development module (currently on "Displaying All Products" in the building the Shirts 4 Mike store) and I've come across an issue that I'm not sure how to fix. My page is not reading the style sheet for the shirts.php page but the css on the rest of the page and pages is fine. I've gone back through the code a dozen times and do not see an error. Can you help!?!
5 Answers
JAMES SANDER
1,347 Pointsforgot the "=" sign in the class designation...
Matthew Mascioni
20,444 PointsCould you post your code?
JAMES SANDER
1,347 Points<?php
$product = array();
$products[101] = array(
"name" => "Logo Shirt, Red",
"img" => "img/shirts/shirt-101.jpg",
"price" => 18
);
$products[102] = array(
"name" => "Mike the Frog Shirt, Black",
"img" => "img/shirts/shirt-102.jpg",
"price" => 20
);
$products[103] = array(
"name" => "Mike the Frog Shirt, Blue",
"img" => "img/shirts/shirt-103.jpg",
"price" => 20
);
$products[104] = array(
"name" => "Logo Shirt, Green",
"img" => "img/shirts/shirt-104.jpg",
"price" => 18
);
$products[105] = array(
"name" => "Mike the Frog Shirt, Yellow",
"img" => "img/shirts/shirt-105.jpg",
"price" => 25
);
$products[106] = array(
"name" => "Logo Shirt, Gray",
"img" => "img/shirts/shirt-106.jpg",
"price" => 20
);
$products[107] = array(
"name" => "Logo Shirt, Turquoise",
"img" => "img/shirts/shirt-107.jpg",
"price" => 20
);
$products[108] = array(
"name" => "Logo Shirt, Orange",
"img" => "img/shirts/shirt-108.jpg",
"price" => 25,
);
?> <?php $pageTitle = "Mike's Full Catalog of Shirts"; $section = "shirts"; include('inc/header.php'); ?>
<div class="section shirts page">
<div class="wrapper">
<h1>Mike’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'); ?>
JAMES SANDER
1,347 Pointssorry, i just found it... :(
JAMES SANDER
1,347 Points//<ul class"products">