1 Reply Latest reply on Aug 9, 2006 3:38 PM by Newsgroup_User

    External style sheets

    leotemp Level 1
      Well youd think this would be pretty straight forward but no matter what i do i dont get any changes in my app. I have tried defining the style sheet and then asigning the style values using "styleName" but nothing..
      My application uses the <mx:Style tag as stated in the docs, not sure what im doing wrong, here is the chunk from my otherwise working app that uses the style sheet.
      -------------------------------------------------------------------------------
      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute" styleName="App">
      <mx:Style source="style.css"/>


      and here is the style sheet, style.css
      -------------------------------------------------------------------------------
      App {
      color: #000000;
      backgroundGradientColors: #c0c0c0, #ffffff;
      backgroundImage: 'img/background.png';
      }


      Hopefully im just dumb, please help this is the final step i need to finish my app.. :(
        • 1. Re: External style sheets
          Level 7
          leotemp wrote:
          > <?xml version="1.0" encoding="utf-8"?>
          > <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute"
          > styleName="App">
          > <mx:Style source="style.css"/>
          >
          >
          > and here is the style sheet, style.css
          > -------------------------------------------------------------------------------
          > App {
          > color: #000000;
          > backgroundGradientColors: #c0c0c0, #ffffff;
          > backgroundImage: 'img/background.png';
          > }

          So the style definition you created would apply to <mx:app></mx:app>
          tags. The easiest way to fix this is to change your css definition to:

          Application {
          color: #000000;
          backgroundGradientColors: #c0c0c0, #ffffff;
          backgroundImage: 'img/background.png';
          }