Re: How to center a graphic?

Anonymous
Not applicable

How to center a graphic?

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.
Tags (1)
9 REPLIES 9
Justin_Cooperm2
Level 10

Re: How to center a graphic?

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

Re: How to center a graphic?

Thanks for that Justin!
Anonymous
Not applicable

Re: How to center a graphic?

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

Re: How to center a graphic?

Put it on the or
. your

element closes before the image begins.

Justin_Cooperm2
Level 10

Re: How to center a graphic?

Put it on the span or div. Your p element closes before the image begins.
Anonymous
Not applicable

Re: How to center a graphic?

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

Re: How to center a graphic?

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).

Anonymous
Not applicable

Re: How to center a graphic?

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

Re: How to center a graphic?

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.