• Resolved carlylillian

    (@carlylillian)


    I’m currently in the process of styling an accordion for my website, but I’ve been having some issues with spacing.

    Here’s a couple of screencaps of what it looks like right now:

    https://i.imgur.com/GPbo4mL.png
    https://i.imgur.com/uxO0xB8.png

    As you can see, there’s a lot of space between the main page’s header and the actual accordion, as well as a fair bit of space between just the accordion titles and between the accordion title and content.

    I’ve tried messing around with the padding and the margins, but that spacing just won’t change. I also did what was suggested in this post, which worked in a sense, because there used to be even more space between the titles and content, but there’s still more space between each section than I’m aiming for.

    Ideally I’d like to have it so that there’s no space between the title area and the content area, and then just a a couple pixels of space between each title.

    I’m feeling pretty stumped, so any help or suggestions would be greatly appreciated. Thank you!

    https://www.ads-software.com/plugins/accordion-shortcodes/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter carlylillian

    (@carlylillian)

    I was able to find a solution to my problem: adjusting the margins on my theme’s <h3> tags. I’m not sure if this was the correct way of doing it, but it seems to be doing the trick.

    Plugin Author philbuchanan

    (@philbuchanan)

    That is exactly what you want to do. By default, the plugin uses h3 tags for the titles. You can adjust the margins in your themes stylesheet to your liking. If you would prefer to not style all h3 tags on your site and only target the accordion titles, you can use the class name instead:

    h3.accordion-title {
        /* Your styles here */
    }

    You can also use .accordion-content to style the content block.

    Thread Starter carlylillian

    (@carlylillian)

    Thank you for your help

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Spacing problem’ is closed to new replies.