I have this code :
<div class="footer_bar_row_desc_richedi">
<a class="myText" href="#">My Text</a>
<div class="myDiv">
 
</div>
</div>
.myText
{
text-transform:uppercase;
font-weight:bold;
color:#b90e1d;
text-decoration:none;
float:left;
font-size:12px;
padding-top: 1px;
text-align:right;
}
.myDiv
{
float:right;
width:25px;
padding-right:5px;
text-align:right;
margin-bottom:3px;
background:red;
}
and I’d like to put the text on the link to the right, near (on the left) of the red div. Seems that attribute text-align:right; doesnt works. Any Idea?
You need to give your .mytext div a width. It is collapsing to the exact width of your text at the moment which means that right aligning the text looks as if it is doing nothing…
See
http://jsfiddle.net/hS3JA/