Streaming live at 10am (PST)

Styling child element of current tab class (not CMS)


#1

I have 3 tabs, and I want a child element for each tab to be present when the tab is current and disappear when it’s not current.

Right now the current attribute seems to affect only the tab element itself, and I cannot find a way to affect its child elements. A similar issue was raised [here](here: Styling child element of Current tab), but that was a CMS case, this is not.

Anyone can help please?


#2

Hi @marcorighetto,

Could you share with us the read only project or some screenshots of what you are trying to achieve as it will make things easier to understand and therefore provide help.

Cheers


#3

Hi, yes: here is what I got so far. I was eventually able to do make a workaround, but I’d be curious to know if there is a more elegant way.

https://preview.webflow.com/preview/preview-5fb031?preview=6adb6a715ebfab769b2894402e1da952

http://preview-5fb031.webflow.io/

You’ll see a dot underneath the current tab. What I technically did was to create a specific interaction per each tab and move the opacity of each single dot in all the other tabs. Not really efficient.