# Problem using Css?

**URL:** https://forum.kirupa.com/t/problem-using-css/171910
**Category:** Uncategorized
**Created:** [December 9, 2005, 4:30am UTC](https://forum.kirupa.com/t/problem-using-css/171910 "2005-12-09T04:30:05Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![romo](https://avatars.discourse-cdn.com/v4/letter/r/ac8455/32.png) [@romo](https://forum.kirupa.com/u/romo)
#### Post date: [December 9, 2005, 4:30am UTC](https://forum.kirupa.com/t/problem-using-css/171910/1 "2005-12-09T04:30:05Z")

</div>

Hello guys,

well I’m using Css to format some dynamic text but I don’t understand something…  
If I try to format a text with a Css class, I’ve no problem… but if I want to format a link it doesn’t work.  
So my question is : Is it possible to do a class for my links? like :

a.link1:{  
…  
}

a.link1:hover{  
…  
}

etc for link2

```auto

//my code in Css : 

a.link1:link {
color: #990000;
}

a.link1:hover {
color: #FFFFFF;
}

//in flash :
function style(mc){
	mc.html = true;
	mc.embedFonts = true;
	mc.styleSheet = styleCss;
}
styleCss = new TextField.StyleSheet();
styleCss.load("liensStyle.css");
styleCss.onLoad = function(ok){
	if(ok){
		style(liens1)
		style(liens2)
		liens1.htmlText = "<a href='#' class ='link1'>liens1</a>";
		liens2.htmlText = "<a href='#' class ='link1'>liens2</a>";
	}
}

```

thanks a lot…
