Style for a table column

T

Tom de Neef

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top