So you think the WordPress built in Gallery shortcode is actually pretty good, but you can't get rid of that irritating grey border around the images, here's how:
.gallery a img { border: 0 !important; }
The importance of the being !important; No need for fancy filters, or plugins. Just add the above code to your own stylesheet. The !important function means that this style overrides any later css, like inline styling (that is not itself also "!important").
Update: if your images are not links, you can remove the "a" selector.
Thank you!!
is there a way to do this without css? I have a free blog and can’t access the css
I’ve been trying to do this for weeks- thanks for your help!
Perfect answer. I really appreciate this, it was driving me nuts.
Thanks!
I read a lot of interesting content here. Probably you
spend a lot of time writing, i know how to save you a lot of time,
there is an online tool that creates unique, SEO friendly articles in minutes, just search
in google – laranitas free content source
Thanks for each alternate useful web-site. The area more may I recieve that type of information coded in this sort of ideal means? I own a goal that i’m right now working with, and I have been at the check for similarly info our site.
[…] to Derry Birkett for helping me find […]
Hi there this is kind of of off topic but I was
wondering if blogs use WYSIWYG editors or if you have to
manually code with HTML. I’m starting a
blog soon but have no coding experience so I wanted to get advice from someone with experience.
Any help would be enormously appreciated!
You saved my life (the digital one) 🙂 thank you so much!
By the way your comments are vanishing on the right to let you know
Hi Derry, couldn’t find what line of CSS in the parent theme was adding the unwanted image border !important finally came through thank goodness! Ta
This issue has been driving me demented! I am a beginner with all of this but the text u suggest putting in, to eradicate the gallery image borders (that make my images look like place mats) . Sounds daft , but where do I put it? Thanks! Lucie uk
In your style.css file (or in the theme options CSS if you have one with your theme)
You need to put it in your theme stylesheet. How you do that will depend on your setup.
THANK YOU! I’ve been looking for this for hours, finding all sorts of suggestions, but nothing worked until this one. Can’t even express how grateful I am.
I know that feeling.