Reputation: 1
In Flex 4, I have a canvas that I'd like to set border-width on via css. I can set the border color and border style, but the border width remains 1 pixel wide no matter what.
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<fx:Style source="global.css" />
<mx:Canvas id="login_panel" width="300" height="200">
<s:Label text="hi there"/>
</mx:Canvas>
global.css:
#login_panel {
border-weight:5px;
border-color:#00ff00;
border-style:solid;
}
Upvotes: 0
Views: 4624
Reputation: 1613
Have you tried the CSS property border-width?
Check out this web page for more info:
http://www.w3schools.com/cssref/pr_border-width.asp
Upvotes: 0
Reputation: 1996
I believe your css is wrong. id="login_panel"
should be styleName="login_panel"
in your mxml. Then in your css #login_panel
should be .login_panel
.
Aside from that, you are using Flex 4 so you should use BorderContainer not Canvas.
Upvotes: 0