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.

WordPress WooCommerce Theme Development Global and Product Templates and Hooks The Main Shop Template

How do I know which classes to use when styling CSS? Like on 6:17 in the video.

I see that in the video there are many classes contained in the <li> element. How do we know which of the classes to use? Also I like using SASS with partial files, how would I go about using this approach or would I have to style directly in the style.css file?

1 Answer

Hi Don,

This is more of a CSS/HTML question than WordPress.

However you could start the UL then the LI for products this could be done in SASS/LESS without issue.

If you look in the dev tools you will notice it is targeting

.woocommerce ul.products li.product, .woocommerce-page ul.products li.product {