1 Reply Latest reply on Aug 27, 2008 10:45 PM by Newsgroup_User

    styleName vs CSS

    mlech0
      we have a flex project with many html UITextFields. The issue is getting the style correct. At preset, text fields are getting their styles from class attributes. For example, if we have an XMLList like this:
      <p class='norm'> This is <a href='event:do something'>Test</a></p>
      the text field is assigned a styleName of .norm from our application css. I have tried to rather assign a styleSheet to the UITextFields, but the only way i can get fonts to embed is if i use the application's css which gets fonts from a swf:
      @font-face
      {
      src:url('fnt/Fonts.swf');
      font-family:'font1';
      }
      So, while styleName embeded the fonts well, the problem is getting things like the anchor to cooperate, and worse, lists (<li> tags) At times, we have multiple paragraphs and/or lists all in one html UITextField. We need to apply more than just one styleName to the fields. However, as i said, if we try to assign a styleSheet to the text field we get empty textFields. It seems the only way to get any formatting is by using styleName.

      I am aware we could litter our markup with <font face='font1' color='#ffffbb'> but that seems a bit of a hack. Can someone give some direction of how to use css, styleNames, and or both to a UITextField? Attached is my method for creating the textfield

      and yes, i have scoured forums and help files.
      thanks