3 Replies Latest reply on Jan 28, 2010 9:35 PM by Gregory Lafrance

    Problem loading multiple css files.

    Gregory Lafrance Level 6

      I was having a problem because I was using the same style name in two css files.


      My application has two modules and each has a <mx:Style> tag:


      <mx:Style source="assets/css/ImagesModule.css"/>

      <mx:Style source="assets/css/HomeModule.css"/>


      The searchHBStyle style is in each file, but has different values:


        horizontalCenter: 0;
        top: 400;
        verticalAlign: middle;

        left: 10;
        top: 10;
        verticalAlign: middle;


      The Flex Builder help system seems to recommend using a single style sheet for the whole application, but is this really true? It seems like a strange limitation, especially when you wish to work with modules, or even just with components that have their own stylesheet.


      I think I can get around this by compiling my modules' css files into SWF files, and then loading them at runtime, but it just seems strange that you have to do this.