WordPress.org

Forums

Collapse-O-Matic
[resolved] On collapsing, a space is introduced (20 posts)

  1. AndrewLeonard
    Member
    Posted 1 year ago #

    It is easiest, I think, to ask you to look at my implementation of your plugin to see the problem
    You can see it here:
    http://www.andrew-leonard.co.uk/wordpress/?page_id=167
    If you click on "Fern Gazette Volume 19" it opens up very nicely but if you click it again, it does close, but it introduces a blank line between it and the next line
    Can you help me with this

    Apart from this minor problem, I think it is a good plugin

    https://wordpress.org/plugins/jquery-collapse-o-matic/

  2. Baden
    Member
    Plugin Author

    Posted 1 year ago #

    Try using tag="div" or setting the default tag attribute to div in the plugin's settings page. The space is due to the :before and :after pusdo class.

  3. AndrewLeonard
    Member
    Posted 1 year ago #

    Thank you for your help
    I changed the default tag attribute to div in the plugin's settings page
    It works better now but I have 2 blank lines under each level 1 item
    I would prefer not to have them - is this possible?
    http://www.andrew-leonard.co.uk/wordpress/?page_id=167

  4. JCKnoell
    Member
    Posted 1 year ago #

    Simply put some negative margins or 0 padding around the elements under which you don't want any spaces.

  5. AndrewLeonard
    Member
    Posted 1 year ago #

    I do not know how to do either of these two things

  6. JCKnoell
    Member
    Posted 1 year ago #

    Where exactly is the extra space you'd like to get rid of? Please be more specific and I'd be happy to give you some coding tips. :)

  7. AndrewLeonard
    Member
    Posted 1 year ago #

    You can see it here:
    http://www.andrew-leonard.co.uk/wordpress/?page_id=167

    If you click on "Fern Gazette Volume 19" it makes the list underneath it visible.
    I am using collapse-o-matic plugin
    http://plugins.twinpictures.de/plugins/collapse-o-matic/
    I have not explicitly put the spaces in between the first level entries and I cannot get rid of them.
    I think it is something in collapse-o-matic that is doing this

  8. JCKnoell
    Member
    Posted 1 year ago #

    I'm still not sure where you want to close the gap... Do you want the individual "Fern Gazette Volumes" to be closer to each other? Or so you want less space between the "Fern Gazette Volume" and the "part 1"?

  9. JCKnoell
    Member
    Posted 1 year ago #

    Go to style.css, to the bottom and paste this:

    .collapseomatic_content {
        margin-top: 20px;
    }
    .collapseomatic {
        margin-bottom: -30px;
    }

    That should do it. Then you can adjust those amounts as you see fit. :)

  10. AndrewLeonard
    Member
    Posted 1 year ago #

    At the moment they look like this:

    Fern Gazette Volume 19

    Fern Gazette Volume 18

    Fern Gazette Volume 17

    I want them to look like this:

    Fern Gazette Volume 19
    Fern Gazette Volume 18
    Fern Gazette Volume 17

  11. JCKnoell
    Member
    Posted 1 year ago #

    Looks like it's resolved! Please mark it as such. :)

  12. AndrewLeonard
    Member
    Posted 1 year ago #

    Very good - it fixes that problem but it causes another!
    If you look here:
    http://www.andrew-leonard.co.uk/wordpress/?page_id=150
    If you click on La Palma, twice, it does not quite go back to where it started

  13. AndrewLeonard
    Member
    Posted 1 year ago #

    not so fast young man!

  14. JCKnoell
    Member
    Posted 1 year ago #

    Haha, sorry. I'll have to take a look at your other issue in a minute. I'll answer as soon as I can. I don't know why it's doing that, but I know how to jury rig it. :)

  15. AndrewLeonard
    Member
    Posted 1 year ago #

    Don't worry
    Here in UK it is nearly midnight and past my bed-time

  16. Baden
    Member
    Plugin Author

    Posted 1 year ago #

    Lots of love in the WP support threads the last week! Can you verify the issue is resolved, or do you still require CSS assistance?

  17. AndrewLeonard
    Member
    Posted 1 year ago #

    It is only half solved
    This problem is still outstanding:
    Very good - it fixes that problem but it causes another!
    If you look here:
    http://www.andrew-leonard.co.uk/wordpress/?page_id=150
    If you click on La Palma, twice, it does not quite go back to where it started

  18. JCKnoell
    Member
    Posted 1 year ago #

    So, here's my thought. Create a separate class for the gazette page and only use the padding and margins to style that one, effectively leaving the page with La Palma alone.

    For example: On the gazette page, just above the expander shortcode, input this code: <div class="gazette-expander">
    Then below the expanders, make sure to add your </div>

    Then on your style sheet, replace

    .collapseomatic_content {
        margin-top: 20px;
    }
    .collapseomatic {
        margin-bottom: -30px;
    }

    with

    .gazette-expander .collapseomatic_content {
        margin-top: 20px;
    }
    .gazette-expander .collapseomatic {
        margin-bottom: -30px;
    }

    This way, it will only style the collapseomatic class WITHIN the gazette-expander class. This should leave the other pages with your plugin alone.

    Let me know if that works!

  19. AndrewLeonard
    Member
    Posted 1 year ago #

    Yes!
    Thank you very much

  20. Baden
    Member
    Plugin Author

    Posted 1 year ago #

    Issues marked as resolved. Great job everyone.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Collapse-O-Matic
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.