PDA

View Full Version : CSS defiance


duncanhall
11-29-2006, 12:38 PM
I'm using an external stylesheet to format some XML text that is loaded into a dynamic textfield. The stylesheet is definately being loaded and being applied to the text box, but the vast majority of the style attributes I try and apply seem to be completely ignored.

If I specify the text to be underlined, or bold, then these styles are applied. But all other attributes (color, font-family, font-size etc.) make no difference whatsoever.

Can anyone offer any reasons as to why this might be?

3pepe3
11-29-2006, 05:43 PM
well i think you must have something like this to load the CSS in your AS

pepeStyle = new TextField.StyleSheet();
pepeStyle.load("formato.css");
your_txt.styleSheet =true

and in the CSS
description {
color: #000000;
font-size: 30x;
font-family: my_font; ///This font is located into the library and my_font is the linkage name
font-weight: normal;
display: block;
text-align:left
}

and the xml saved in format UTF-8 and looking like that?

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<yourText>
<description>we are the champions, we are the champions...</description>
</yourText>
cause if is like that i don't see any problems