views:

396

answers:

2

How does Google manage to properly align the second column (i.e. the ticker name) in the "Get Quotes" search box suggestion dropdown in http://finance.google.com?

e.g. if you enter "iii" - the second column is perfectly aligned.

It does not use a fixed-width font - so just adding the correct numbers of spaces to the "ticker" will not work.

How do they do that?

+1  A: 

most likely just using margins. float the first column left then set the margin to the width of the first column.

Darren Kopp
A: 

I just viewed source with a DOM inspector and it appears that they are spans for each cell with a margin set (as Darren said) to position the right column over.

travis