I managed to do so with nth-child and nth-of-type, but the problem I have now is that the highlight does not stay in the original element and moves towards the new I create in the CMS How can I solve this?
As you can see, instead of staying on the “Community Manager & Social Media Strategist” card, the highlight “jumps” to the next item created in the CMS
You should address this with just the CMS and no pseudo class custom code. What you’re looking for is a “type”. Add a field, like an option field, and add an option, like “highlight”. Now design your items like if they were all highlighted, by having a colored div in the background for example. Now give the Highlight option to some posts. now select the div and with conditional visibility set it to visible when option equals highlight.
Pseudo classes are blindly targetting a position, not a particular element.
Wow, I’m almost there thank you so much @vincent!
Thanks to this I managed to create a “type” for the logo. Now I can select in which card I show the logo (in the first image only the first and third card have the type, it works!), but the background is still resisting.
How can I solve this? I tried to also create a div but it seems like it hides the rest of the cards and I want both highlighted and non-highlighted to show at the same time.
Thank you for your first answer and beforehand the next one @vincent
DON’T filter the list on the Highlight option. (remove this filter)
DO create a div for the bg color, just a div on the back, with nothing in it. Set it to Absolute and make it expand all the way in the Expander parent (that you pass Relative).
THEN select this div and add a conditional visibility: div is visible when option is ON.
@vincent what can I tell you… Thank you again and again for helping me solve this and even taking the time to record a video. I finally did it and I couldn’t be happier.