Tagged: Accordion
How do I prevent longer titles from overlapping the “+” symbol at the right side of the “Elegant” mode accordion?
Here’s a visual. Text should stay approximately on the left side of the hand-drawn yellow line in this image.
Hey enfold-94556,
Thanks for the screenshot. Could you post a link to where we can see the actual element on your site please?
Best regards,
Rikard
Here is a private link to the site. Sorry, I should have included that from the start.
Best,
Raina
Hi,
Thanks for that. Please try the following in Quick CSS under Enfold->General Styling:
@media only screen and (min-width: 768px) and (max-width: 990px) {
p.toggler {
padding-right: 10%;
}
}
Best regards,
Rikard
Hey Rikard,
I
1. added the code
2. cleared the hosting side cache
3. opened a new browser and cleared cache on that
4. loaded the site
No effect.
The Inspector tool shows that the 10% margin rule is being overwritten by some other CSS rule.
try padding-right: 10% !important;
Adding the !important caused this to show.
However, the 10% was not enough. 60px seems to work well. I checked on desktop at a wide variety of browser widths, and on a phone.
This is needed on all screen sizes, so I removed the media query. My final code looks like this:
p.toggler {
padding-right: 60px !important;
}
}
However, this is also affecting the accordions with the “Minimal” styling. Those don’t need this styling, since they don’t have the + icon on the right.
Is there are solution that will only affect the accordions / toggles that use the “Elegant” styling?
Hi,
Thanks for the update. Please try this CSS instead:
.av-elegant-toggle p.toggler {
padding-right: 60px !important;
}
Best regards,
Rikard
Checked on desktop: Edge, Firefox and on mobile: Chrome on Android; works as intended.
Thanks, Rikard!
Hi,
Great, I’m glad that you got it working. Please let us know if you should need any further help on the topic or if we can close it.
Best regards,
Rikard
OK to close.