• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Pseudo-Decimal Align

First day on the job and the boss asks whether I know Excel. Oh, sure, we’re old pals. “Great, and I hear you know how to build webpages,” he says. Yes, indeedy. “Excellent, well then, take this spreadsheet and bring it over to our site—and don’t forget to line up all the decimal points.” Uh...gulp. There is no decimal align in HTML, CSS, or any other web alphabet I know, so how am I going to pull this off?

Here are three techniques that will get your decimal ducks all in a row, assuming they all have the same number of digits to the right of the decimal point. Let’s try the hard-core HTML version first. To begin, select and right-align the column with the decimals. This shoves those numbers right up against the cell wall—and it ain’t a pretty sight. Next, position your cursor at the end of the first number and press Ctrl+Shift+Spacebar (Command+Shift+Spacebar) five or six times to put in a bunch of non-breaking spaces. You’ll have to do that for all the numbers in the column (although you can copy and paste the spaces and I won’t tell).


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint