Featured Image Add Border

Posted in: Newspaper
Post count: 8

Hi there
I would like featured images to have a border, I can do it on pages but cant see exactly where to add the following class – .imgborder {border: solid 1px #1f3aa3;} for Featured images?
Many thanks

Post count: 22421

Hello,
For featured images, you cannot add the class, but you can add the css using the class already in use for the featured images.
For example:
.td-post-featured-image{
border: solid 1px #1f3aa3;
}

You can add the code in the theme panel-> custom css box
Thanks.

Post count: 8

Hi Bogdan
Thank you that worked, sort of! The problem is the border is larger than the picture. Left, right and top of picture ok but the border at the bottom is about 6mm/1/4″ below the picture. I have set the picture size in Settings/Media/Large Size to 960×540 but it isn’t changing the border gap?
Thank you again, I hope you can help!

Post count: 22421

Please provide a link so I can inspect the image and see where the margin or padding is coming from.
Thanks.

Post count: 8

Thanks again
I am running it on localhost with WAMP so I will set things up on the web and get back to you.

Post count: 8

PAGE: http://travision.uk/border-test/
2 pictures with class added – Border OK

POST
http://travision.uk/post-border/
You will see the border issue, I haven’t changed Media sizes in WordPress as it doesn’t make any difference.
I’m assuming it’s what we say in the UK ‘Finger Trouble’ as I am no expert!
I have added the custom css as you instructed.

Do I Email WordPress Admin to you, if so how?
Thank you Bogdan for you help

Post count: 22421

Hi,

Please also add this code in the theme panel->custom css box:
.td-post-featured-image img{
margin:0!important;
}

Thanks.

Post count: 8

Thanks alot, that fixed it. I couldn’t log in initially as Admin user has changed which is odd. Is this something you did or I guess I have an issue somewhere.
Many thanks
Peter

Post count: 22421

Hello,

I did not log into your site as I do not have a username or password to do so. I just accessed it as any other user and inspected the code in the browser inspector. The issue is unrelated.

Thanks

Viewing 9 posts - 1 through 9 (of 9 total)
The forum ‘Newspaper’ is closed to new topics and replies.