Streaming live at 10am (PST)

How can i do text size on active dropdown?

#1

Hello community! Help me pls, i’m trying to make dropdown 2 text size 45 (when it’s active) and dropdown 1 text size 36 (when it’s non active) with IX2. But i don’t know how to that :(. Help me pls. Thanks a lot)

https://preview.webflow.com/preview/accordion-dropdown-text-scale?utm_source=accordion-dropdown-text-scale&preview=7486be36d42c25f7e8f47b1dbdec2d3d

Dropdowns i made by this tutorial (by Waldo)

Tutorial: https://webflow.com/blog/the-art-of-progressive-disclosure-in-web-design
Preview: https://preview.webflow.com/preview/accordion-menu-tutorial?utm_medium=showcase&utm_source=accordion-menu-tutorial&preview=f91ada51b6a232f8ae0516c43d557472

0 Likes

#2

Hi @pzhydkykh, I think you should add some css custom code:

.w-dropdown-link.w--current{ font-size: 36px; }

You should also give your dropdown lists different class names, so you’ll be able to customize them differently.

0 Likes

#4

I’ve just changed my previous answer, hope it helps. The code should go to the custom code tab in the project settings, inside the head code part.

0 Likes

#5

i’m sorry, but that doesn’t worked for me(

0 Likes

#6

@pzhydkykh can you tell me a little bit more about why you are changing the font size on open and close events for the dropdown? It’s possible to do, but would require some custom code.

Alternatively you could scale the text elements within the dropdown open/close interaction. Just change the transform-origin of the text to start from the left instead of the center:
CloudApp

0 Likes