How to center a graphic? | Community
Skip to main content
July 1, 2014
Question

How to center a graphic?

  • July 1, 2014
  • 9 replies
  • 3291 views
When I click on an image and use the image editor I will not center the image.  It will move it to the right or the left, but the center.

Then I looked up and article which suggested to the table insert.  This also does not work.   I am unable to edit the number of columns to 1.   It is stuck at three.  I am wondering if this the reason why it is not working?  Any thoguhts?   This seems like it should be a fairly easy thing to do.
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

9 replies

Justin_Cooperm2
Level 10
July 1, 2014
If you click the HTML button in the rich-text editor, you'll see that your image element has a <p> tag around it. Add the following:

<p style="text-align:center;"
<YOUR IMAGE ELEMENT>
</p>
Michelle_Tizian
Level 10
July 1, 2014
Thanks for that Justin!
July 1, 2014
Hi Justin - I entered that here:

<p>&nbsp;</p>
</span></div>
<p style="text-align: center;">&nbsp;</p>
<div><span>&nbsp;<img src="http://go.brandlift.com/rs/vizu/images/mobile inforgraphic.png" alt="mobile inforgraphic.png" width="400" /></span></div>
<p>&nbsp;</p>
<br />

it doesn't seem to work.  Is there something else I should do?
Justin_Cooperm2
Level 10
July 1, 2014
Put it on the or
. your

element closes before the image begins.

Justin_Cooperm2
Level 10
July 1, 2014
Put it on the span or div. Your p element closes before the image begins.
July 1, 2014
Michelle,

I have another suggestion for your image code if you're still having trouble.  Without seeing the rest of your code, the <div> and <span> tags around your image seem to be redundant. You could try cutting both 
(I have struck through them below) and placing the align attribute within your <img> tag (see where I have bolded).

<div><span>&nbsp;<img src="http://go.brandlift.com/rs/vizu/images/mobile inforgraphic.png" alt="mobile inforgraphic.png" width="400" align="middle"/></div></span>

Hopefully this helps.
Justin_Cooperm2
Level 10
July 1, 2014
Nate - that won't work in the TinyMCE editor. 

Darren - Just throw style="text-align: center;" into one of the parent elements (div or span).

July 2, 2014
Hey everyone - thanks for your help.  I had to get a piece out so it just went not centered.  I guess the big question here is why do I have to be a html coder to perform a simple task such as centering an image? I do not know html and issues like this really slow me down.
Justin_Cooperm2
Level 10
July 2, 2014
Good question, you shouldn't!

We work all the time on improving the editor so that common tasks are easy in the UI. That said, the UI will not have parity with what you can do in code so sometimes there are gaps/limitations.