# Funky (mis)alignment with styled htmlText?

**URL:** https://forum.kirupa.com/t/funky-mis-alignment-with-styled-htmltext/280032
**Category:** flash
**Created:** [January 21, 2009, 9:08pm UTC](https://forum.kirupa.com/t/funky-mis-alignment-with-styled-htmltext/280032 "2009-01-21T21:08:34Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Stickeroo](https://avatars.discourse-cdn.com/v4/letter/s/e19adc/32.png) [@Stickeroo](https://forum.kirupa.com/u/Stickeroo)
#### Post date: [January 21, 2009, 9:08pm UTC](https://forum.kirupa.com/t/funky-mis-alignment-with-styled-htmltext/280032/1 "2009-01-21T21:08:34Z")

</div>

Here’s my problem: I have a textfield that gets its content from an XML node; such a node might look like this:

```auto

<abstract><![CDATA[<p><u>blah blah blah</u> this is text and here's some more blah blah blah</p>]]></abstract>

```

In my actionscript, I’m creating a textField and first setting a defaultTextFormat, then applying a stylesheet (created from a parsed string literal with my styles in it).

It works fine for pretty much everything; the one (or two, actually) problems I’ve noted are italic or underlined text.

In the sample node above, you’ll notice that I have \<u\>…\</u\> markup – that’s because I started with \<i\>…\</i\> but it was doing weird things with spacing. Apparently, \<u\> is doing weird things with spacing, too. Here’s a screenshot: (attached).

Some of the attributes I have set are embedFonts=true, multiline=true, wordWrap=true, and I’ve tried autoSize=“left” and autoSize=“center” with the same miserable results.

I’d appreciate any insight anyone can share! Thanks!

(Edit: The problem I’m having shows up right after the word _Factory_ in the image below)
