Here are two inline examples from Chapter 18 of the Flex Developer's Guide:

<?xml version="1.0"?>
<!-- styles/ClassSelector.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";>
    <mx:Style>
        .myFontStyle {
            fontSize: 15;
            color: #9933FF;
        }
    </mx:Style>
    <mx:Button id="myButton" styleName="myFontStyle" label="Click Here"/>
</mx:Application>

The following example defines a new style that applies to all
instances of the Button class:

<?xml version="1.0"?>
<!-- styles/TypeSelector.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";>
    <mx:Style>
        Button {
            fontSize: 15;
            color: #9933FF;
        }
    </mx:Style>
    <mx:Button id="myButton" label="Click Here"/>
</mx:Application>

An external CSS file would be used in the same fashion.

You can download the Flex documentation at:

    http://www.adobe.com/support/documentation/en/flex/


On 10/18/07, Venkat Perpati <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
>
>
>
> Hi,
>
> got it. <mx:Style source="http://www.somesite.com/mystyles.css";>  is used to 
> include css file in the application . But how to use the style defined in it 
> , is it same as we use in html file
>
> like     <tr class="style1" >
>
> can you pls give me an example of how we use the styles after including the 
> CSS file in the application.
>
> regards,
> Venkat Perpati
>
> Peter Connolly <[EMAIL PROTECTED]> wrote:
>
>
> Here's how you reference a CSS file:
>
> <mx:Style source="http://www.somesite.com/mystyles.css";>
>
> After that, there's a chapter on CSS in the Flex Developer's Guide.
>
> On 10/18/07, Venkat Perpati <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> >
> >
> >
> >
> > Hi,
> >
> > Can anyone please tell me how to add a CSS file and use the styles defined 
> > in CSS file in the flex application.
> >
> > Thanks in Advance
> >
> > regards,
> > Venkat Perpati.
> >
> >
> > ________________________________
> Meet people who discuss and share your passions. Join them now.
> >
> >
> >
> >
>
>
>
>           ________________________________
 5, 50, 500, 5000 - Store N number of mails in your inbox. Click here.
>
>
>
>              

Reply via email to