how to center widget images?
-
Hi. I’m using a new theme (Piano Black). The right sidebar widget images of my books appear left-justified (within the sidebar column) and a bit too close to the main panel, whereas the text above each book image overhangs it. Is there anyway to make these widget images centered or right-justified?
The blog I need help with is: (visible only to logged in users)
-
You can manage this with an extra bit of code. The code you are currently using for your first image widget is:
<img src="https://ishamcook.files.wordpress.com/2015/02/teahouse.png"></a>By adding a “div” around the image you can control where the image shows up in the widget. To center the image you’d use this code:
<div style="text-align:center;"><img src="https://ishamcook.files.wordpress.com/2015/02/teahouse.png"></a></div>You can use the same opening and closing div tag around each of your images to center all of them.
Let me know if you have any questions about that or need some extra help.
- The topic ‘how to center widget images?’ is closed to new replies.