Set Custom CSS IDs for Individual Divi Accordion Items

Written by Dan Mossop

Assigning unique CSS IDs to specific Divi Accordion items allows for precise control over styling, targeting, and linking within your page content. This ability is particularly useful when you want to apply custom designs or create anchor links to particular accordion sections, enhancing both the look and functionality of your site. In this guide we show you how to assign a custom CSS ID to individual accordion items, enabling more advanced customization and usability.

Set Custom CSS IDs for Individual Divi Accordion Items using the Divi Booster Plugin

This method demonstrates how to assign a unique CSS ID to a specific Divi Accordion item by utilizing the Divi Booster plugin. It allows you to precisely target individual accordion items for advanced styling or anchor linking, a capability not available in standard Divi installations.

Open the Accordion Item's Advanced Settings

To begin, locate the Accordion module on your page and open its settings. Click on the first accordion item you wish to customize—this will expand its individual settings. Next, navigate to the 'Advanced' tab at the top, and then expand the 'CSS ID & Classes' section. Here, you'll be able to add custom identifiers for this particular accordion item.

Assign a Custom CSS ID

Within the expanded 'CSS ID & Classes' section, you'll see a field labeled 'CSS ID.' Enter your desired ID here (for example, 'custom-accordion-id'). This unique identifier can now be used in your CSS targeting or when creating anchor links in your content.

Publish and View Your Changes

Once you have entered your custom CSS ID, make sure to save your changes. Click the 'Publish' button in the Divi Builder to make your new CSS ID live. You can now visit your page on the front end to confirm that the Accordion item appears as intended and is ready for advanced customization or linking.

Conclusion

With just a couple of tweaks in the Divi Builder, you can now add unique CSS IDs to individual Accordion items—unlocking more flexible styling and anchor link options for your Divi site!

We may earn a commission when you visit links on our website.

Take Control of Your Divi Accordion Design

With Divi Booster, you can assign custom CSS IDs to individual accordion items, enabling precise styling and advanced customization options not available in standard Divi. Perfect your site's design effortlessly.

Latest Posts

Add a Visible Shadow to Divi Gallery Lightbox Arrows

Give the lightbox navigation arrows in your Divi galleries a stylish pop and improve their visibility by adding a shadow beneath the arrows. This quick guide will show you how to make your navigation arrows stand out against the lightbox overlay.Add a Visible Shadow...

Adjust Lightbox Arrow Size in Divi Gallery

Customize the size of the navigation arrows that appear in your gallery lightbox so they’re easier to see and aligned with your site’s design. Whether you want larger, more accessible controls or a subtler look, setting a precise arrow size creates a more polished...

Change Lightbox Arrow Color in the Divi Gallery Module

Make the lightbox navigation arrows in your Divi Gallery match your brand and stand out against your images by assigning a custom color. This improves visual consistency, enhances accessibility with better contrast, and elevates the overall browsing experience for...

Change the Divi Gallery Module Grid Image Scaling

Divi’s Gallery module offers a great way to showcase images, but it can sometimes stretch or crop them in unwanted ways. This article explains how to manage the module’s image scaling behavior to ensure your images are displayed at the correct size and aspect...

Enable Swipe Navigation in the Divi Gallery Lightbox

Enabling swipe navigation in the Divi Gallery module's lightbox allows users to seamlessly browse through gallery images by swiping left or right, creating a more interactive and mobile-friendly experience. This functionality can significantly improve user engagement...

About Dan Mossop

Dan is a Scottish-born web developer, now living in Brisbane with his wife and son. He has been sharing tips and helping users with Divi since 2014. He created Divi Booster, the first Divi plugin, and continues to develop it along with 20+ other Divi plugins. Dan has a PhD in Computer Science, a background in web security and likes a lot of stuff, 

0 Comments

Submit a Comment

Comments are manually moderated and approved at the time they are answered. A preview is shown while pending but may disappear if your are cookies cleared - don't worry though, the comment is still in the queue.

Your email address will not be published. Required fields are marked *.