Style for a table column

Discussion in 'HTML' started by Tom de Neef, Sep 29, 2011.

  1. Tom de Neef

    Tom de Neef Guest

    My web server produces a html page with a table.
    The user can select the page and copy it to Word (ctrl+A ctrl+C -> ctrl+V)
    and I want the layout (as well as the contents) of the table to be correct
    in the document. The problem is with the layout.
    The simplest layout item to discuss is align="right". Consider a table
    where this attribute applies to several columns.

    a) when each cell gets the attribute via <td align="right">, there is no
    problem. Browsers and Word display correctly.
    b) when I use <table><colgroup align="right"> or <colgroup
    style="text-align:right"> or <colgroup><col align="right"> etc, then FF will
    not display the table correctly.
    c) when I use <style>td.r {text-align:right}</style> in combination with <td
    class="r">, browsers will be correct but Word will not show the alignment.

    So, I use approach a), but the file gets rather big since there are several
    other layout attributes as well (such as padding-right, border-right).
    I would appreciate suggestions for improvements (reduction in file size,
    correct display in all modern browsers, Word copies layout info when
    copy/pasting to it).
    TIA
    Tom
    Tom de Neef, Sep 29, 2011
    #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. Random
    Replies:
    1
    Views:
    4,618
    Random
    Nov 19, 2004
  2. Replies:
    0
    Views:
    2,444
  3. savvy
    Replies:
    1
    Views:
    462
    savvy
    Jan 18, 2006
  4. Cal
    Replies:
    1
    Views:
    522
    Tim B
    Jan 8, 2007
  5. Ken Varn
    Replies:
    0
    Views:
    429
    Ken Varn
    Apr 26, 2004
Loading...

Share This Page