Alignment of Images in Sidebar
-
When inserting an image that is not the full width of the sidebar, the image is automatically aligned to the left, which is a standard default.
No WordPress Image Alignment Buttons
The Image Widget does not provide any of the WordPress alignment buttons like we see in the regular content editor, to get the image to align center or align right or none or left. Without the WordPress alignment buttons, I have to assign a class name to the image then go to Custom CSS.Custom CSS Does Not Work on Image Widget
The Custom CSS does not work at all when using the assigned class name to the image, including using the property value “!important”.One way I test Custom CSS on modifying elements in a theme is use either a color dashed border or using “Display: none”. I tried “Display: none” with my assigned class name to the Image Widget and that did Not work. This means the Custom CSS is not affecting the widget at all.
Theme Class/ID names tired
I even tried the class or id names, assigned to the sidebar Image Widget by the Theme, and that still does not work in Custom CSS on an Image Widget. They work on other widgets like the Custom HTML widget, but not the Image Widget.Custom Class Name Works In Browser Inspector
When I use the browser inspector for that page and Image Widget element, I insert into the inspector my assigned image class name and the CSS properties, that works, but it does not work from the Custom CSS area.How can I apply Custom CSS to an Image Widget?
I do not know if this is a theme bug or if this is a bug in WordPress core.
Essentially, with all the above tests, what can I do to use Custom CSS on my assigned class name to the Image Widget?
- The topic ‘Alignment of Images in Sidebar’ is closed to new replies.