1 Reply Latest reply on Jul 8, 2010 1:49 AM by BhaskerChari

    can we move horizontalAlign and verticalAlign of containers which are overlayed to css ?


      Hi ,


      I have got numerous HBoxes and  VBoxes overlayed in an application and when i try to move the styles of  the HBoxes and VBoxes especially horizontalAlign and verticalAlign it  has a visual difference cos it takes the precedence of the parent  container even though I have specified seperate css files for the  containers.

      Eg :


      <mx:HBox horizontalAlign="left"  verticalAlign="middle">

           <mx:HBox  horizontalAlign="right" verticalAlign="middle">




      So suppose I got 2 css files one for  the top level HBox and one for the child HBox


      Its kinda taking the alignment  of the top level HBox. What should I do ?




        • 1. Re: can we move horizontalAlign and verticalAlign of containers which are overlayed to css ?
          BhaskerChari Level 4

          Hi Ajantha,


          I don't think there should be any problem with what you are using and working on...There is no such as precedence kind of thing problem you mentioned..


          Can you please post a screenshot depicting your problem or can you please elaborate on this..??


          Actually in the below mxml code All the elements or controls placed in top level HBox are aligned left and are aligned vertically in middle....and the elements within the inner HBox are horizontally aligned to right and are aligned vertically in middle...


          <mx:HBox horizontalAlign="left"  verticalAlign="middle">

               <mx:HBox  horizontalAlign="right" verticalAlign="middle">




          Say suppose you have used the below mxml code ...





          left="100" top="100" backgroundColor="red" horizontalAlign="left" verticalAlign="middle" width="400" height="300">



          <mx:HBox backgroundColor="blue" horizontalAlign="right" verticalAlign="middle" width="250" height="200">



          <mx:Text width="100%" fontSize="14" text="I am aligned horizontally right and vertically in middle in inner HBox"/>









          Then you would get something like below...please see the screenshot..





          Bhasker Chari