![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
Hello! ![]() I am working on an app that uses dozens of tables, some with hundreds (or even thousands!) of rows. I am interested in formatting the tables using as much CSS as possible, so the HTML is barebones and easy-to-read/modify. While thinking up how to do it, I came up with this idea, which I welcome comments on: QUESTION: What are the pros and cons of using one letter class names for common TD cell formatting, like "nowrap" or "align=right", etc. Something like this: .l { text-align : left; } .c { text-align : center; } .r { text-align : right; } .t { vertical-align : top; } .m { vertical-align : middle; } .b { vertical-align : bottom; } .w { white-space : wrap; } .nw { white-space : nowrap; } This would enable you to do "shorthand" for formatting cells, like this: td class="c t nw">100 million</td where this particular cell centered horizontally, middled vertically, and with no wrapping... What do you think? |
|
My biggest fear is it will get expensive processor-wise. |
|
Anyone done something like this, who would care to comment, good or bad? |

#3
| |||
| |||
|
Hello! ![]() I am working on an app that uses dozens of tables, some with hundreds (or even thousands!) of rows. I am interested in formatting the tables using as much CSS as possible, so the HTML is barebones and easy-to-read/modify. While thinking up how to do it, I came up with this idea, which I welcome comments on: QUESTION: What are the pros and cons of using one letter class names for common TD cell formatting, like "nowrap" or "align=right", etc. Something like this: .l { text-align : left; } .c { text-align : center; } .r { text-align : right; } .t { vertical-align : top; } .m { vertical-align : middle; } .b { vertical-align : bottom; } .w { white-space : wrap; } .nw { white-space : nowrap; } This would enable you to do "shorthand" for formatting cells, like this: td class="c t nw">100 million</td where this particular cell centered horizontally, middled vertically, and with no wrapping... What do you think? |
|
My biggest fear is it will get expensive processor-wise. |
#4
| |||
| |||
|
#5
| |||
| |||
|
|
QUESTION: What are the pros and cons of using one letter class names for common TD cell formatting, like "nowrap" or "align=right", etc. |
#6
| |||
| |||
|
|
(i.e. rows as "odd" or "even") |
#7
| |||
| |||
|
|
Isn't it a pity that there's no way to specify that (for rows or columns) directly in CSS? |
#8
| |||
| |||
|
|
Alan J. Flavell wrote: Isn't it a pity that there's no way to specify that (for rows or columns) directly in CSS? Given the negligible support of the attribute selectors we do have, then I doubt it would matter much whether there ought to be or not. I handle this sort of task with XSLT. Long-winded CSS is no problem to me, I just add it at the step before. |
#9
| |||
| |||
|
|
But it's more a matter of taking a little pride in what one extrudes out onto the world wild web - - and I'm sure you really feel that way yourself, despite your occasional remarks that might be interpreted to suggest otherwise :-} |
#10
| |||
| |||
|
|
Alan J. Flavell wrote: But it's more a matter of taking a little pride in what one extrudes out onto the world wild web - - and I'm sure you really feel that way yourself, despite your occasional remarks that might be interpreted to suggest otherwise :-} I'm pragmatic. If ugly is the best the standard offers and it works, then I'll make ugly. _Publishing_ live sites on the web is no place for arguing as to how things ought to be, you just have to work with what you have. |
![]() |
| Thread Tools | |
| Display Modes | |
| |