Code embed to only affect in one sections CMS

So i have this code, see picture. It makes so the CMS list alternates directions so RtL , LtR etc. I only want it to affect the CMS list as shown, and not all lists that i add after.
What - how do i add code so it only affects this section?
Do i add ID tag and then target that?

All help is appreciated.


Link to read;
https://preview.webflow.com/preview/floe-3dd71c?utm_medium=preview_link&utm_source=designer&utm_content=floe-3dd71c&preview=2e29e1d3721c84bd8fed760aba33f39c&locale=en&workflow=preview

You could use an ID, or a class on the Collection List for targeting.
A class is more reusable, so you could add a class like alternating-list, and then preface each of your CSS selectors e.g. .alternating-list .w-dyn-item

To ensure the alternating direction effect only applies to a specific CMS list and not all lists, you can add a unique ID or class to the CMS list section in Webflow, such as cms-list-section or alternate-direction-list. Then, modify your existing CSS or JavaScript to target that specific ID or class, like #cms-list-section or .alternate-direction-list, instead of applying the styles globally. This will limit the effect to only the targeted CMS list section, preventing it from affecting other lists on the page.

Thank you for the help.
I did like you mentioned. I put a class on the CMS list and targeted that in the embed code.

What worked. The code for alternating cms works with just the first line of code, the following is for clarification.

.YOURCLASS:nth-child(even) { direction: rtl; } .YOURCLASS(even) p { direction: ltr;} .YOURCLASS: { direction: ltr;}