A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: [RESOLVED] Using 'class' in htmlText

  1. #1
    Member
    Join Date
    May 2004
    Posts
    57

    resolved [RESOLVED] Using 'class' in htmlText

    Can the class attribute only be used with span tags with htmlText?

    i.e.

    <h1 class="red">Red Text</h1> // wrong
    <h1><span class="red">Red Text</span></h1> // right

    I don't recall reading in the Adobe docs anything about only being able to use class with span? Am I doing something wrong?
    He took daddy's umbrella!

  2. #2
    Mod cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,448
    "span class" is proper HTML. class alone cannot be used.
    - The right of the People to create Flash movies shall not be infringed. -
    | www.Flashscript.biz | Flashscript Biz Classes/Components |

  3. #3
    Total Universe Mod jAQUAN's Avatar
    Join Date
    Jul 2000
    Location
    Honolulu
    Posts
    2,429
    You can see here that only <p> and <span> support a 'class' attribute.
    http://help.adobe.com/en_US/AS3LCR/F....html#htmlText

  4. #4
    Member
    Join Date
    May 2004
    Posts
    57
    Thanks, Jaquan. For some reason I thought that htmlText supported heading tags! Doh! I also found it really limiting that only margins could be applied to the <p> tag itself.

    For anyone else who might come across this thread, I thought I'd mention that using unsupported tags produced strange padding etc in the text.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center