• I was wondering if there was an easy way to modify the plugin to have the text displayed under the icon to be wrapped in a paragraph, div or span so that I can select it with CSS.

    It’s easy enough to modify the text size, font, and color by selecting the <a href> element, but since the image and text sit next to eachother, separated by nothing but a <br>, I have no way to add padding between the two elements.

    If that’s confusing hopefully this image will help-
    picture of issue

    Is it possible to have the plugin modified, or is there something I’m missing?

    https://wordpress.org/plugins/document-gallery/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Dan Rossiter

    (@danrossiter)

    Hi Jeff,

    What about selecting on the img and adding padding to that element?

    Something like: .document-icon img { padding-bottom: 2em }

    You could also get fancy with the ::after selector if you really want, though it’s probably unnecessary for this.

    -Dan

    PS: If you’ve found this plugin useful, please take a moment to rate it. Thanks! 🙂

    Thread Starter jeff.waite

    (@jeffwaite)

    lol. Well dang. Yeah, that will work.

    I wanted to target the text cause I thought I might want to play with other aspects of it’s box-model, but all I really needed was to create padding between the two, so using the img should work fine.

    Sorry to bother you. Carry on!

    Plugin Author Dan Rossiter

    (@danrossiter)

    No worries, Jeff! Glad that worked! 🙂

    If you do decide you want to do things to the text itself, you could always do the styling on .document-icon then reverse any unwanted effects on the img by styling .document-icon img. Not the cleanest approach in the world, but should get the job done.

    -Dan

    PS: If you’ve found this plugin useful, please take a moment to rate it. Thanks! 🙂

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘selector for text inside href anchor’ is closed to new replies.