Skip to main content
Participant
December 15, 2010
Answered

Help! Vertical Alignment Issues in TextFlow

  • December 15, 2010
  • 1 reply
  • 600 views

Hi Guys,

     So I  have a fun one here.  I have a single textArea.textFlow that contains a  mixture of plain text and images.  The text is aligned at what looks to  be bottom, while the images show up at a top-like alignment...how can I  get them all to be aligned at the same level?


     The  content of my textFlow is something  like this:  <p  textIndent="15">You can even place graphics inline like <img  source="http://blah.blah.com:8080/images/ce/TopicCGoal6/image6.png" /> this.</p> and it spits this out:

tempText.png

     Help?!

Thanks,

Adrian

This topic has been closed for replies.
Correct answer robin_briggs

Images are aligned so that the bottom of the image matches the baseline of the text. In this case, I think the bottom of the image is blank --- the image contains text, and the text has no descenders. That's just a guess, but it explains what you are seeing.

You can adjust the image up & down from its default position using the baselineShift attribute. Something like <img baselineShift="-6"> should help. If it's not convenient to apply it in the XML, you can apply it in ActionScript directly to the InlineGraphicElement.

Hope this helps,

- robin

1 reply

robin_briggsCorrect answer
Adobe Employee
December 15, 2010

Images are aligned so that the bottom of the image matches the baseline of the text. In this case, I think the bottom of the image is blank --- the image contains text, and the text has no descenders. That's just a guess, but it explains what you are seeing.

You can adjust the image up & down from its default position using the baselineShift attribute. Something like <img baselineShift="-6"> should help. If it's not convenient to apply it in the XML, you can apply it in ActionScript directly to the InlineGraphicElement.

Hope this helps,

- robin

stickamwAuthor
Participant
December 15, 2010

ROBIN!!!!

YOU ROCK!!!  I've been jacking with this thing all day long trying to find the right answer.  THANK YOU SO MUCH for the quick response...saved my bacon here.

The images actually have no white space below the text...I thought of that one too...I just added the baselineShift="-3" (6 was too much) and that fixed it right up.

Nap time.

Best,

Adrian