Global CSS for all accordions?

Q&ACategory: PluginGlobal CSS for all accordions?
David asked 1 year ago

Hi–
The custom CSS field in each accordion seems to refer only to that accordion (e.g., “#accordions-1790 .accordions-head{}” will style only accordion #1790.
How (and where) can I add CSS that will affect ALL accordions used in my site?  I don’t want to have to make changes on every page whenever I tweak a style sheet….
Thanks!
David

1 Answers
Hasan Staff answered 1 year ago

Welcome to our forum,
Its better add your custom CSS to site header (heder.php) with style tags, its will effect on all of your pages,

<style type="text/css">
/*add css here*/
</style>

Please let me know for more help.
 
Regards

David replied 1 year ago

Thanks, Hasan. And sorry to be dense, but do I then just simply leave off the "-1790" (or whatever) to affect all accordions? So I might add this, for example to my header.php file?<br><br><br>'#accordions .accordions-head{<br> font-family: "Raleway", sans-serif;<br> font-weight: 400;<br> letter-spacing: 0.1em;<br> text-transform: uppercase;<br>}<br>#accordions .accordion-content{<br> font-family: "Lora", serif;<br> font-size: 18px !important;<br> line-height: 32px !important;<br>}'

Hasan Staff replied 1 year ago

yes are right, you don’t need put id (1790) if you want to apply all of your accordions , just added to site header with style tag, this should work fine, If you need more help please let me know.

David replied 1 year ago

Brilliant. Thanks so much, Hasan. I clearly need to brush up on my CSS syntax! 🙂

Hasan Staff replied 1 year ago

Yea, you are welcome, If you need more help please keep replying 🙂 Regards