Forum Moderators: not2easy

Message Too Old, No Replies

Aligning elements beside text of different widths

Problems when text is resized

         

Reflection

6:21 pm on Aug 21, 2003 (gmt 0)

10+ Year Member



Hard to come up with a subject for this question but anyway :):

Say you have 3 lines of text:

Line 1 xxxxxxxxxxxxxxxxxxx
Line 2 xxxxxxxxxxxx
Line 3 xxxxxxxxxxxxxxxxxxxxxx

And you want to have another element to the right of each line but you want these elements to be inline with each other(_used as spacer):

Line 1 xxxxxxxxxxxxxxxxxxx_______X
Line 2 xxxxxxxxxxxx______________X
Line 3 xxxxxxxxxxxxxxxxxxxxxx____X

Now this is easy enough to accomplish by giving each line the same fixed width but it becomes a problem if the text size is increased.

Ok I hope that make sense. Anyone know how to go about getting around this problem.

Thanks

MonkeeSage

6:27 pm on Aug 21, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Mabye using ems as the size unit? BlobFisk posted a bunch of good links to threads about using ems just a bit ago. Link [webmasterworld.com].

Jordan

Reflection

6:54 pm on Aug 21, 2003 (gmt 0)

10+ Year Member



I think I have it working using em's, thanks, its just a lot of guess work at the moment.

MonkeeSage

7:03 pm on Aug 21, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Right on. I posted the wrong link by accident: correct link [webmasterworld.com]

In the link (the correct one heh) BlobFisk links to a post from SuzyUK showing how to calculate (troughly) from px to em. Seemed to worked pretty well and cut out alot of the guess work. :)

Jordan