Envira Gallery Documentation

Documentation, Reference Materials and Tutorials for Envira Gallery

How to Remove the Lightbox Border

Would you like to remove the border from the image in the lightbox? Using some custom CSS you can easily do that! We’ll walk you through the steps needed to easily remove the lightbox borders.

This tutorial is a little more technical then the other docs and will require a basic level of CSS.

Your first step is to create a new gallery or edit an existing one. You can follow along with our documentation for creating your first gallery.

The next step you’ll need to install and activate Envira’s CSS Addon. Navigate to the Addons section and click Install then Activate on the CSS Addon.

Install and activate the CSS addon

Below is the CSS we’ve used in our demo.

You’ll need to change this ID number to match your gallery ID number. You can find this by looking in the sidebar of your gallery edit screen.

For more information on how to find your gallery ID number you can read this article.

You can also just add this CSS to the WordPress Customizer to make this change for all of your Envira Galleries!

To find out more about the WordPress Customizer, please review our article on How to add custom CSS to the WordPress Customizer.

If you’re using the CSS Addon to only change 1 gallery, add your CSS to the Misc tab inside the Custom Gallery CSS box.

Add your CSS to the Misc tab in the Custom Gallery CSS box to remove the lightbox border
Once you’ve added your CSS just click Publish or Update to save the changes to the gallery.

div[data-envirabox-id='415002'] .envirabox-image-wrap {
    border:none !important;
Be sure to update the '415002' with your own gallery ID number

If you’re going to want this change for all galleries, just remove the gallery ID number from the CSS and add your CSS to the Appearance » Customize » Additional CSS and click Publish to save the changes.

See the demo!

Would you like to have some more fun with Envira and CSS? Why not check out our tutorial on How to Change Lightbox Overlay Transparency!


Q: Will this work for albums too?

A: Absolutely! You’d use exactly the same CSS but just be sure the ID matches the album. If you added your CSS to the WordPress Customizer then it would automatically make this change for all Envira gallery and album images.

Q: Do I have to use CSS?

A: Not at all! Many of our lightbox themes have different styles. The Base (Dark) and Base (Light) for example, don’t have any borders at all on the lightbox image.