Re: (CSS) Aligning signed numbers in cells

Discussion in 'HTML' started by Jukka K. Korpela, Aug 10, 2003.

  1. Gnarlodious <> wrote:

    > Is there a way to center numbers in a column (CSS) of cells
    > disregarding the negative sign?


    Not really.

    > You can see what I mean here in the "Cartesian" column:
    > http://www.Spectrumology.com/Space/TetralGrid.html


    With quite some pain, yes. The use of dark text on black background makes
    the page _very_ hard to read, even if I set font size to "Largest".

    > I'd like to center the blue numbers according to the digit and not the
    > sign.


    To _what_ digit? It seems that you would actually want to align the column
    according to the decimal separator (decimal point or decimal comma). That
    would be _theoretically_ possible both in CSS and in HTML, but it's really
    not worth trying, since current browsers don't even try to support that.

    Special alignment of table cells or other elements is sometimes possible
    using kludges, like using leading or trailing no-break spaces in element
    content so that left or right alignment produces the desired effect for
    visual content. But this would in practice require using monospace font
    too.

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
    Jukka K. Korpela, Aug 10, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dave Bazell

    Aligning 2d array of numbers

    Dave Bazell, Jul 31, 2003, in forum: Perl
    Replies:
    0
    Views:
    1,172
    Dave Bazell
    Jul 31, 2003
  2. Replies:
    0
    Views:
    512
  3. kyrpa83
    Replies:
    1
    Views:
    616
    kyrpa83
    Oct 17, 2007
  4. Rob1bureau
    Replies:
    1
    Views:
    799
    joris
    Feb 27, 2010
  5. Joel Finkel

    Cells[].Text or Cells[].Controls[0]

    Joel Finkel, Sep 1, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    296
    Joel Finkel
    Sep 1, 2003
Loading...

Share This Page