User Guide

104 Chapter 4: Building a Flex User Interface Visually
Importing styles from an external CSS file
You can import styles defined in an external CSS file by using the
source property of the
<mx:Style> tag.
To import styles from an external CSS file:
1.
Make sure the CSS file is located in your site root folder or in any of its subfolders.
2.
Open the CSS Styles panel (Window > CSS Styles) and click the Attach Style Sheet button at
the bottom of the panel.
The Attach External Style Sheet dialog box appears.
3.
Click Browse and browse to the external CSS style sheet.
4.
Click OK.
The name of the external CSS style sheet appears in the CSS Styles panel.
Tip: If you hand-code a reference to an external style sheet in an MXML component file, you must
specify the path relative to the application in the source property of the <mx:Style> tag.
Related topics
About CSS styles in Flex” on page 103