Skip to main content
Known Participant
September 21, 2010
Answered

Inline Graphic Element Position

  • September 21, 2010
  • 1 reply
  • 1443 views

Hi,

Ho can I correctly place an image in a textflow? My images look like they have padding-bottom.

Here you can see the seleccion bellow the image:

Here you can the that the image is positioned too high in relation to the text line selection.

I guess this can be fixd in the textflow marpup, here is what I'm using:

var markup2:String = "<TextFlow xmlns='http://ns.adobe.com/textLayout/2008' fontSize='16' textIndent='0' paragraphSpaceAfter='0' paddingTop='0' paddingBottom='0' paddingLeft='0' paddingRight='0' lineHeight='100%' >" +

                    "<TextLayoutFormat color='#ff0000' id='hoverOverBrand' />" +

                    "<TextLayoutFormat color='#00ff0F' id='mouseDownOverBrand' textDecoration='underline' />" +

                    "<TextLayoutFormat color='#0000ff' id='defaultLinkBrand'/>" +

                    "<TextLayoutFormat color='#0000ff' id='hoverOverEmail'/>" +

                    "<TextLayoutFormat color='#0000ff' id='mouseDownOverEmail' lineThrough='true' />";

Any ideas?

This topic has been closed for replies.
Correct answer

By default the image sits on the baseline of the text. If you'd like something different, you can set baselineShift to change that position - positive numbers to move the image up and negative numbers to move the image down.

1 reply

storm767Author
Known Participant
September 21, 2010

here's the TLF markup:

var markup2:String = "<TextFlow xmlns='http://ns.adobe.com/textLayout/2008' fontSize='16' textIndent='0' paragraphSpaceAfter='0' paddingTop='0' paddingBottom='0' paddingLeft='0' paddingRight='0' lineHeight='100%' fontFamily='Arial'>" +

                    "<TextLayoutFormat color='#ff0000' id='hoverOverBrand' />" +

                    "<TextLayoutFormat color='#00ff0F' id='mouseDownOverBrand' textDecoration='underline' />" +

                    "<TextLayoutFormat color='#0000ff' id='defaultLinkBrand'/>" +

                    "<TextLayoutFormat color='#0000ff' id='hoverOverEmail'/>" +

                    "<TextLayoutFormat color='#0000ff' id='mouseDownOverEmail' lineThrough='true' />";

Correct answer
September 21, 2010

By default the image sits on the baseline of the text. If you'd like something different, you can set baselineShift to change that position - positive numbers to move the image up and negative numbers to move the image down.

storm767Author
Known Participant
September 21, 2010

Thank for the response. what number should I use to position the image at the same level of the text.