# Css quirks with external text

**URL:** <https://forum.kirupa.com/t/css-quirks-with-external-text/250317>\
**Category:** Uncategorized\
**Created:** [January 28, 2008, 1:46pm UTC](https://forum.kirupa.com/t/css-quirks-with-external-text/250317 "2008-01-28T13:46:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashtonbrier](https://avatars.discourse-cdn.com/v4/letter/a/bcef8e/32.png) [@ashtonbrier](https://forum.kirupa.com/u/ashtonbrier)\
**Post date:** [January 28, 2008, 1:46pm UTC](https://forum.kirupa.com/t/css-quirks-with-external-text/250317/1 "2008-01-28T13:46:16Z")

</div>

I have a dynamic textbox loading external text and a style sheet. Here is the code and the link to an example of the quirk. When you mouse over the href link the text shifts to the right and the image moves down when you click on it. Anybody know why this is happening?

Thanks for any help.

[http://www.ashtonbrier.com/txt/links2.html](http://www.ashtonbrier.com/txt/links2.html)

code:

//creating textbox  
var ex\_txt:TextField = new TextField();  
addChild(ex\_txt);

//loading external stylesheet  
var css\_req:URLRequest= new URLRequest(“flashstyle.css”);  
var css\_loader:URLLoader = new URLLoader();  
css\_loader.addEventListener(Event.COMPLETE, load\_css);  
css\_loader.load(css\_req);

//loading external html  
var url:String = “links.html”;  
var txt\_load:URLLoader = new URLLoader();  
txt\_load.load(new URLRequest(url));  
txt\_load.addEventListener(Event.COMPLETE, textready)

//Text box properties  
ex\_txt.x= 20;  
ex\_txt.y= 50;  
ex\_txt.border= false;  
ex\_txt.width= 235;  
ex\_txt.height= 375;  
ex\_txt.wordWrap= true;  
ex\_txt.multiline= true;  
ex\_txt.selectable= false;

function load\_css(event:Event):void  
{  
var style:StyleSheet = new StyleSheet();  
style.parseCSS(css\_loader.data);  
ex\_txt.styleSheet = style;  
}

function textready(event:Event):void  
{

```
ex_txt.htmlText = event.target.data as String;

```

}
