ID:1503967
 
(See the best response by Kitsueki.)
Lately I've been searching on BYOND ways to align text to the right (on a browser), but all I could get was the whole text aligned to the right, and I just needed a part of it.

I'm aware I need to use CSS, and I've used Google to learn more about it, but when it comes to BYOND I don't know what to do.

Let's say I have this text...

"Name Age"

I would like age to be aligned to the right, what should I type? I found this in a site:

div
{ text-align:right; }

But before that I suppose I have to type something like -html-, -body-, or -style- (replacing - with < and >), but that's what I don't really get.

Could anybody please help me? Thank you a lot :)
Best response
.right{
text-align: right;
}
---------
var str = "Name <span class='right'>Age</span>"

I'd use a span and setup a class for it, no need to permanently modify the div element.

Also, maptext can be odd about things.
In response to Kitsueki
Kitsueki wrote:
> .right{
> text-align: right;
> }
> ---------
> var str = "Name <span class='right'>Age</span>"
>

I'd use a span and setup a class for it, no need to permanently modify the div element.

Also, maptext can be odd about things.

Thanks! But where do I have to type
.right{
text-align: right;
}


?
To the interface style box.
Does this actually work? In my experience in working with interface outputs, I've never been able to really style the output. The output always comes out as if I didn't apply any styles. This goes for aligns, padding and margin, etc.
It worked, but I found another problem: every time I try to align a part of the text it skips a line. So I cant manage to put one text on the left and one on the right on the same line.
Instead of text-align: right;, try using float: right;. I have always found float to be more flexible, but I haven't really used it with BYOND interfaces.