Align image at the center of the widget
-
The widget’s title is centered and the text is aligned to the left automaticaly. I would like to center the image, but I can’t seem to do it. Is it impossible?
<img src=’image URL’ width=’200px’ align=’center’ alt=’Capazes’/>
<p /><img src=’image URL’ width=’200px’ alt=’Capazes’/>
<p />
Saber mais
<p />The blog I need help with is: (visible only to logged in users)
-
Hi,
You may center text in a text widget as follows:
<div align="center">the text goes here</div> -
-
Hello!
No… I want to center the image, but I think it’s a text widget. It was one that already existed in the templates. If you go to https://anamanuelferreira.wordpress.com/ and scroll down you’ll see a widget titled “Capazes” with two images (“Capazes” and a hand, black and yellow). I’d like to center those images, so that they stay under the title.
I tried doing this
<img src=’image URL’ width=’200px’ align=’center’ alt=’Capazes’/>
But it didn’t work… Am I doing something wrong or are the images impossible to center?
Thanks for your help!
-
No… I want to center the image
Sorry, I hadn’t read the OP carefully.
Am I doing something wrong or are the images impossible to center?
It’s not impossible to center images in a text widget. Here are two ways of doing that:
<div align="center"><img src="Image URL here"></div><p style="text-align:center;"><img src="Image URL here" /></p> -
That second one was a little sloppy, though it would work. It should have been:
<p style="text-align:center;"><img src="Image URL here"></p>
- The topic ‘Align image at the center of the widget’ is closed to new replies.