how to add border to image and caption

Posted in: Newspaper
Post count: 43

post text and caption are getting mixed, which making users difficult to read, so in need to add a border and change the background colour of the caption.
how can I add that?
reference website click here
my website wwww.bigstarbio.com

Post count: 35449

Hi,

Unfortunately I do not have access to your website -> https://i.imgur.com/CNNjGix.png
You can set the caption on featured images like this -> caption -> http://prntscr.com/p2mudb -> http://prntscr.com/p2mupt -> http://prntscr.com/p2muy5 -> http://prntscr.com/p2mv62-> http://prntscr.com/p2mudb -> http://prntscr.com/p2mupt -> http://prntscr.com/p2muy5 -> http://prntscr.com/p2mv62
In order to set the border you need to use a custom css like this one -> https://i.imgur.com/av6UoHh.png
The code need to be set in theme panel > custom code> custom css
body.td-animation-stack-type0 .post figure{
padding: 5px;
border: 1px solid gray;
}
.wp-caption-text, .wp-caption-dd {
margin-bottom: 4px
}

Thank you!

Post count: 43

sorry my website is https://bigstarbio.com pls check it

Post count: 43

I added CSS code to live CSS, but not working

Post count: 43

not working in amp

Post count: 43

Calin Pls answer

Post count: 35449

Hi,

Please try not to reply multiple times in the topic if possible, this will only delay our response. Replying multiple times will refresh the topic date and move it to the back of the line, we answer from oldest to newest

Please try this custom css -> https://i.imgur.com/vV6mucH.png
body .post .wp-block-image.is-resized{
padding: 5px;
border: 1px solid gray;
}
.wp-block-image .aligncenter>figcaption, .wp-block-image .alignleft>figcaption, .wp-block-image .alignright>figcaption, .wp-block-image.is-resized>figcaption {
display: block;
}

Set the code -> https://i.imgur.com/EsHvdMG.png
For amp set the code in theme panel> mobile theme > custom code css -> https://i.imgur.com/Kce5viu.png

Thank you!

Post count: 43

Thank you! it’s working

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