• Resolved hessi2

    (@hessi2)


    Hi Folks,

    I want to disable the image description on SLB via CSS:

    .slb_data_desc {
    display: none;
    }

    But it does not work. Is there an other way?

    TIA
    Regards
    Michael

Viewing 1 replies (of 1 total)
  • Plugin Author Archetyped

    (@archetyped)

    Hi, if you are overriding the styles of an existing lightbox theme (rather than creating a custom theme), then a CSS selector with a higher specificity than just using the class name will likely be required.

    For example, you can include the lightbox’s wrapper ID to increase specificity as noted in the <b>Increasing Specificity</b> section of the tutorial on customizing lightbox theme styles:

    #slb_viewer_wrap .slb_data_desc {
        display: none;
    }
    

    However, the CSS selector required to override a theme’s own styles depends on the the CSS used for that theme, so inspecting the CSS used for the specific theme (by opening the theme’s CSS files, or inspecting the CSS with your browser’s web developer tools) is recommended.

    There is also the more brute-force approach of using the !important flag to force CSS rules to be used even if a selector has lower specificity:

    .slb_data_desc {
        display: none !important;
    }
    

    That said, using a custom lightbox theme is highly recommended particularly because it avoids having to override styles of another theme. See SLB’s Themes documentation for more details.

Viewing 1 replies (of 1 total)
  • The topic ‘Disable Image Description?’ is closed to new replies.