14 Replies Latest reply on Dec 15, 2009 4:40 PM by Flex harUI

    Error in Simple mx Component Styling?

    pkrekelberg Level 1

      Like many, I am finding the behavior of CSS namespaces in Flex 4 very frustrating.


      I have a very simple example which is not working. I hope I'm missing something!


      I have a SWC with a defaults.css file. The CSS file is setting the style for Alert using the following:



      @namespace "http://www.adobe.com/2006/mxml";





      backgroundColor: #333333;


      color: #ff0000;



      buttonStyleName: Button;

      paddingBottom: 8;




      The namespace is set as you can see. I have also tried this by specifying "mx". The Alert box does not get styled, not even the background color gets set.


      What am I missing? I am using the Alert in Actionscript using Alert.show. This worked fine in Flex 3.