# AS3 custom CSS tag BUG?

**URL:** https://forum.kirupa.com/t/as3-custom-css-tag-bug/320886
**Category:** flash
**Created:** [April 4, 2011, 8:33pm UTC](https://forum.kirupa.com/t/as3-custom-css-tag-bug/320886 "2011-04-04T20:33:20Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![FlashUserNull](https://avatars.discourse-cdn.com/v4/letter/f/f475e1/32.png) [@FlashUserNull](https://forum.kirupa.com/u/FlashUserNull)
#### Post date: [April 4, 2011, 8:33pm UTC](https://forum.kirupa.com/t/as3-custom-css-tag-bug/320886/1 "2011-04-04T20:33:20Z")

</div>

I’m running into a problem whenever i apply a custom CSS tag to my html text in a TextField. At the end of the custom tagged text it automatically adds a carriage return and starts a new line even though there is plenty of area to the right to add more text before it wordwraps. It does not do this if its a custom class. I.E: \<a class=“customTag”\>SomeText\</a\> works fine but \<customTag\>SomeText\</customTag\> causes a wordwrap after SomeText even though there may be plenty of space yet. Ok so is this just the nature custom CSS tags, or is this a bug. here is my code:

//css file named cssStyle.css--------------------------------  
.customBold{  
color:#FF00CC;  
}

bob{  
font-size: 20px;  
font-weight: bold;  
color: #2400ff;

}

//AS3 CODE------------------------------------------  
var loader:URLLoader = new URLLoader();  
var req:URLRequest = new URLRequest(“cssStyle.css”);  
loader.load(req);  
loader.addEventListener(Event.COMPLETE, loaderCompleteHandler);

function loaderCompleteHandler(event:Event):void {  
var sheet:StyleSheet = new StyleSheet();  
sheet.parseCSS(loader.data);  
t\_txt.styleSheet = sheet;  
t\_txt.htmlText = “\<span class=“customBold”\>This is a silly text with CSS style\</span\> and without \<bob\>a\</bob\> CSS! Hopefully \<bob\>bees\</bob\>we will be able to lorem ipsenm dolor sit amet dominous Various lorem dlor ipsem dolor sit amet locking varing Lorem Dolor ipsem  
Newline  
is another lorem dolor”;  
}
