# Problems with css

**URL:** <https://forum.kirupa.com/t/problems-with-css/155071>\
**Category:** flash\
**Created:** [July 14, 2005, 3:25pm UTC](https://forum.kirupa.com/t/problems-with-css/155071 "2005-07-14T15:25:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![inzane](https://avatars.discourse-cdn.com/v4/letter/i/b38774/32.png) [@inzane](https://forum.kirupa.com/u/inzane)\
**Post date:** [July 14, 2005, 3:25pm UTC](https://forum.kirupa.com/t/problems-with-css/155071/1 "2005-07-14T15:25:14Z")

</div>

I can’t get the .css to work inside flash can anyone help?

**car1.xml**

> \<?xml version=“1.0”?\>  
> \<compare\>  
> \<vehicle\>  
> \<name\>Mazda 6 Sedan\</name\>  
> \<comment\>The Mazda 6 Sedan;is a great working file.The Mazda 6 SDN is a great working file.The Mazda 6 SDN is a great working file.The Mazda 6 SDN is a great working file.The Mazda 6 SDN is a great working file.The Mazda 6 SDN is a great working file.The Mazda 6 SDN is a great working file.The Mazda 6 SDN is a great working file.The Mazda 6 SDN is a great working file.The Mazda 6 SDN is a great working file.The Mazda 6 SDN is a great working file. \</comment\>  
> \<image\>images\mazda6\_sedan.jpg\</image\>  
> \</vehicle\>  
> \<compare\>

**Mazda.css**

> 

name {  
color: #000000;  
font-family: Tahoma;  
font-size: 18px;  
font-weight: bold;  
display: block;  
}  
comment {  
color: #ff0000;  
font-family: Tahoma;  
font-size: 14px;  
font-weight: normal;  
display: block;  
}

**Action script**

> 

//init TextArea component  
comment\_txt.html = true;  
comment\_txt.wordWrap = true;  
comment\_txt.multiline = true;  
comment\_txt.label.condenseWhite=true;  
//load css  
compareStyle = new TextField.StyleSheet();  
compareStyle.load(“mazda.css”);  
name\_txt.styleSheet = compareStyle;  
comment\_txt.styleSheet = compareStyle;  
//load xml  
function loadXML(loaded) {  
if (loaded) {  
\_root.vehicle = this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;  
\_root.comments = this.firstChild.childNodes[0].childNodes[1].firstChild.nodeValue;  
\_root.image = this.firstChild.childNodes[0].childNodes[2].firstChild.nodeValue;  
name\_txt.text = \_root.vehicle;  
comment\_txt.text = \_root.comments;  
empty\_MC.loadMovie(\_root.image);  
} else {  
trace(“file not loaded!”);  
}  
}  
xmlData = new XML();  
xmlData.ignoreWhite = true;  
xmlData.onLoad = loadXML;  
xmlData.load(“car1.xml”);

I have 2 dynamic boxes one called comment\_txt and the other name\_txt but the css does not apply to anything?

what am i doinf wrong?
