# Multiple StyleSheets in one textbox?

**URL:** <https://forum.kirupa.com/t/multiple-stylesheets-in-one-textbox/199697>\
**Category:** flash\
**Created:** [September 5, 2006, 10:09am UTC](https://forum.kirupa.com/t/multiple-stylesheets-in-one-textbox/199697 "2006-09-05T10:09:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lewi\_p](https://avatars.discourse-cdn.com/v4/letter/l/ac91a4/32.png) [@lewi\_p](https://forum.kirupa.com/u/lewi_p)\
**Post date:** [September 5, 2006, 10:09am UTC](https://forum.kirupa.com/t/multiple-stylesheets-in-one-textbox/199697/1 "2006-09-05T10:09:43Z")

</div>

Hi,

Been looking at this for awhile and cant figure out why I **can** have multiple css styles when I use an external css file but when I try and create styles in AS I **cant** seem to get two different stlyes in the same box?

heres my test code…

```auto

this.createTextField("textBox", this.getNextHighestDepth(), 10, 10, 300, 100);
textBox.border = true;
textBox.html = true;
textBox.multiline = true;
textBox.wordWrap = true;
//
var style_1 = new TextField.StyleSheet();
style_1.setStyle(".style_1", {fontFamily:'Verdana, Arial, Helvetica, sans-serif', fontSize:'18px', color:'#000000', fontWeight:'bold'});
var style_2 = new TextField.StyleSheet();
style_2.setStyle(".style_2", {fontFamily:'Verdana, Arial, Helvetica, sans-serif', fontSize:'12px', color:'#FF0000', fontWeight:'normal'});
//
textBox.styleSheet = style_1, style_2;
textBox.htmlText = "<p class='style_1'>Text style one - <p class='style_2'>Text style two";

```

Im sure its something to do with the 2nd last line where I define which styles foe each textbox…any help would be kool.

cheers
