[SOLVED] Border around image and not image caption when captioning used
This isn't a deal breaker for me, but I was wondering if anyone knows a way to use the caption feature when inputting an image into a post / page without that caption being displayed within the walls of the image's border. Aesthetically I prefer to have a border around my images, and a caption below free from encumberment.
I checked the posts herein and only found those addressing border removal from individual images by use of Class code. Great idea, but not quite what I was looking for. Also didn't see a way to do this under the Image section of ATO. Saw you could have or not have borders around a captioned image (including the caption), or around the image (when a caption was not used), but didn't see how I could tweak those options to achieve my goal. Maybe I'm missing something and just need a second look with borrowed eyes. Any taker? Thanks in advance. |
This is probably not precisely what you are looking to do but it might get you pointed in the right directions.
In ATO>Style Image>Images in Posts: Captions Style put something like the following HTML Code:
text-align: center; HTML Code:
font-size: 0.8em; |
Thanks for taking the time to reply. I gave your code a whirl and it does add a couple of pixels of space between the caption and the image, which looks nice, but I must not have explained myself well enough. I'm trying to have the captioned text live outside the border entirely while retaining the approx. spacing below the bottom border line that it currently has below the image, itself. Your suggestion is lovely, but still leaves the text encased in the border's shell.
Thanks again for taking the time. Genuinely appreciated. |
Wanted to clarify my prior post where I said:
...still leaves the text encased in the border's shell.... I didn't mention that your suggested code worked in that it placed the shaded area around the image and left the text unencumbered below it, as I'd asked. However, I'd added back in border: 1pt; to the ATO>Style Image>Images in Posts: Captions Style section because I like having a hard border around the image. However, the resulting border wrapped around the captioned text, too. If possible, I'd like to retain the colored padding around the image with a hard border outside the padding, just not with the caption, inside that hard border. Thoughts? |
That's why I said this is not precisely what you are looking for. The only way I could potentially get your idea to work meant editing the css.php file and I don't like to do that as it means I have to update that file each time I update the theme.
|
Understood. You were a gentleman to share your option with me and I thank you for that.
Funny you should mention editing css.php ... I already added a line to the css.php file, as well as a section to the index.php file, so future updates will always require me to manually deal with those files. If you do happen to have a suggestion for modifying the code that wouldn't take too much of your valuable time, I'm here and listening. If not, thanks again for your generosity. VC |
In css.php find the following
HTML Code:
.wp-caption img { HTML Code:
/* .wp-caption img { HTML Code:
padding: 5px; HTML Code:
text-align: center; |
Yup! Yup! Yup! That's it.
You're a genius and a gentleman. Thanks much!! VC |
All times are GMT -6. The time now is 01:26 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.