# Css text-align won't work

**URL:** <https://forum.kirupa.com/t/css-text-align-wont-work/187333>\
**Category:** Uncategorized\
**Created:** [April 28, 2006, 12:32pm UTC](https://forum.kirupa.com/t/css-text-align-wont-work/187333 "2006-04-28T12:32:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Laaf](https://avatars.discourse-cdn.com/v4/letter/l/7bcc69/32.png) [@Laaf](https://forum.kirupa.com/u/Laaf)\
**Post date:** [April 28, 2006, 12:32pm UTC](https://forum.kirupa.com/t/css-text-align-wont-work/187333/1 "2006-04-28T12:32:38Z")

</div>

Heylo!

I’m trying to align some text to the right with css but it doesn’t seem to work.

Here’s the code i used:

```auto
var css = new TextField.StyleSheet();
css.load("ref/flash.css");

```

flash.css :

```auto
.link {
  text-align : right;
}

```

assigning stylesheet to textfield…

```auto
_root.link.styleSheet = css;
_root.link.text = '<span class="link">sometext</span>';    

```

This won’t work, but when i replace the text align in the css file with, say, color : #ff9900;, it does work…

What am i doing wrong? Thanks!
