• Resolved gordo019

    (@gordo019)


    I normally don’t have a problem tweaking the CSS of themes or plugins, but with the Jetpack Tiled Gallery I found it difficult to tweak anything related to this gallery. I simply want to add about 30px of margin or padding to the bottom of my Tiled Galleries.
    My Tiled Galleries work fine. I have tried adding:

    .tiled-gallery {
    clear: both;
    margin-bottom: 30px;
    overflow: hidden;
    }
    I have tried to add this to my style.css of my child theme (my preference and no luck), to tiled-gallery.css of the module itself (no luck), and within Edit CSS (no luck).

    Example:
    http://anadyradventures.com/wordpress/anadyr-trips/daytrips/

    What am I missing with CSS tweaking and Jetpack modules (v_2.2)?

    http://wordpress.org/extend/plugins/jetpack/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Richard Archambault

    (@richardmtl)

    Hi!

    .tiled-gallery {
    margin-bottom: 30px !important;
    }

    That should be enough to do it. Can you add that to your Edit CSS and let me know if that worked?

    FYI, the !important is there because the tiled-gallery.css file is being loaded at the bottom of the site; the !important will allow what you enter to take precedence over the CSS file. Also, you should’t edit the file in the plugin itself, because your changes would be overwritten with the next plugin update. 🙂

    Thread Starter gordo019

    (@gordo019)

    The !important forced the bottom margin rule to work. I have it working from my child theme style.css file.

    So…… is fair to say that Jetpack CSS tweaking must always include the !important rule? I really thought that all CSS tweaking belongs in the child theme’s style.css file and should be loaded last and have precedence over all other CSS, keeping all site CSS tweaks together. This strategy is what I have been doing for while and I thought this was what WP best practice gurus wanted us to do? Am I confused?

    The Edit CSS editor seems to be for WordPress.com folks that don’t use a code editor? I really don’t want any CSS tweaks in a second location.

    Plugin Contributor Richard Archambault

    (@richardmtl)

    Hi!

    is fair to say that Jetpack CSS tweaking must always include the !important rule?

    No, it’s really only for the Carousel and Tiled Galleries, since the CSS files for those are being loaded at the bottom of the page. This means that they over-ride whatever other CSS is in your theme, unless you either a) use an !important declaration, or b) increase the specificity of your selectors. Using the !important was the simplest way in this case.

    This strategy is what I have been doing for while and I thought this was what WP best practice gurus wanted us to do? Am I confused?

    Using a child theme’s style.css is definitely the best practice, you’re right about that! However, it’s always possible that another plugin will load CSS after your style.css file, such as in this case. It’s on those occasions that you need to use the a) or b) options mentioned above.

    The Edit CSS editor seems to be for WordPress.com folks that don’t use a code editor? I really don’t want any CSS tweaks in a second location.

    It’s actually for anybody, really, that wants to make quick edits to their theme without necessarily creating a child theme or editing their theme’s style.css directly. I’ve used it myself in the past for quick edits to help someone fix something. But the great thing is, you don’t need to use it if you don’t want to! You can definitely continue using your child theme as you’ve been doing, that’s totally fine!

    I hope this answered your questions!

    Thread Starter gordo019

    (@gordo019)

    Yes, you have been very clear. Consider this case closed. Love the Jetpack gallery stuff, now I can tweak them as needed.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Tweaking CSS with Tiled Gallery’ is closed to new replies.