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 trialJeff Styles
2,784 Pointsul.products is not centered
All styles have applied accordingly (borders, hover, etc), except that the products grid is being pushed to the far left of the browser window. When I jump ahead and make ammendments from the next lesson this isn't an issue, but I'm confused as to why at the end of this current lesson, Randy's .products class is centered and mine is not. Thanks!
<?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 } ?>```
Benjamin Payne
8,142 PointsCentered in the center of the page or centered aligned? What do you have for your centered .css?
1 Answer
Peter Furler
31,647 PointsI believe that this is occurring, because you have forgotten to wrap your code with a div of a class of "wrapper" within the div with the classes of "section shirts page"
Thus ul.products should be a child of div.wrapper, which should be a child of div.section.shirts.page
Ted Sumner
Courses Plus Student 17,967 PointsTed Sumner
Courses Plus Student 17,967 PointsPlease either post the code or a snapshot if you are working in Workspaces