Centering Widget Image Boxes
-
I was on my blog site today (statispro1978replay.wordpress.com) and at the bottom of the main page I noticed all of my widget image boxes, which include captions, have shifted to the left after being centered. The images have also shifted within the gray border/box which surrounded the image and caption. I tried to correct this, but discovered the edit options for image widgets have apparently changed as well. Is there a new way for me to re-center the gray border ‘boxes’ that include images and captions? Thanks!
The blog I need help with is: (visible only to logged in users)
-
Hi there,
The following CSS code helps you to center the images and captions.
.wp-caption img, #content .wp-caption img { margin: 2px auto 0; }Optionally, you can use this code below to remove the gray background behind those images.
.wp-caption { background: none; }However, please make sure that you are subscribing to the Premium plan or the Business plan. The custom CSS function is just for users of those plans.
If you have further questions, please let us know anytime.
Thanks :) -
Hacchism, thanks for the quick response and the information! But since I don’t have a premium plan, I just want to make sure I understand this right: for the simple task of centering an image in a widget, which I was once able to do for free, I now have to pay for? Otherwise, my images will always be left justified, and also left justified within the gray background?
-
Hi @torben78,
I understood you have a free plan. Sorry for the inconvenience.
I guess that the function you used to be able to use is this: https://en.support.wordpress.com/widgets/image-widget/#settings.
However, I can’t find this image widget’s setting on my end too. Since the only solution I can provide you now is using the Custom CSS, I’ve tagged this thread for staffs. Hopefully, they will provide other solutions you can perform with your free plan. Please kindly wait for a response from them.
Thanks!
-
Hi there,
With a recent updated of the WordPress software our image widget was replaced by the new image widget included in the Core software, and it looks like the new widget doesn’t have the option to set alignment for the image. I’ve asked a developer who worked on this if that is intentional or an omission. I’ll let you know what they say.
It looks like that doc hasn’t been updated yet since the new widget was added. Thanks for bringing it to our attention.
-
Thanks for the info!
I noticed that when I was referring to the doc(https://en.support.wordpress.com/widgets/image-widget/). It was confusing :(
Please kindly update the doc as soon as possible. I appreciate your support :)
-
Hacchism and Kokkieh, thank you both for the help on this! I was going to change out my affected images, but I’ll leave them alone until I hear from you. Again, thanks for the input!
@haccism
I followed the link you supplied above, and yes, that was the widget image function I was used to seeing before.
-
Just an update on this:
It’s by design that the widget no longer has alignment options, and that’s unlikely to change. Any change that does happen will have to be made in the Core WordPress software before it would be changed here on WordPress.com.
That said, if you already had alignment set when we switched to the new widget, that alignment setting should have been kept. Someone is looking into that and I’ll let you know once I hear more.
-
Thanks for the update and keeping me in the loop! And you may not have an answer to this, but do you know why an existing option like left, center, or right aligning a widget image would be removed? It seems like such an odd thing to do to such a simple and harmless option. Again, I appreciate all your help with this, kokkieh!
-
This is a brand new widget that hadn’t existed in WordPress before – the widget we had here on WordPress.com was part of the Jetpack plugin, so an internal feature. We’ve replaced it with the Core widget which was designed from scratch.
With the new widget they left the option out to simplify the widget, and I think the assumption is that images added to the widget would fill it width-wise, given that widget areas tend to only take up about a third of the screen width most of the time. This last is just a guess, though, as I can’t find it specifically mentioned in the discussion on the Core ticket for the new widget.
-
That makes sense…thanks for explaining it. I noticed one of my widget photos didn’t shift left like the others, and I wondered it was for the same reason you mentioned: it was already wide enough to fill the width of the column. If we can’t find a solution to fix the ones that shifted, I’ll just replace them with larger images, wide enough to fill the widget.
-
We have someone looking into why the alignment wasn’t kept, so if you want to wait a little we might be able to still fix it on our end. But if you prefer to replace the images with wider/bigger ones, you certainly have that option.
-
-
-
-
I sent you an email last week about this. I’ll resend it in case it didn’t go through, but please check your spam folder as well.
- The topic ‘Centering Widget Image Boxes’ is closed to new replies.