![]() | |
![]() |
| | Thread Tools | Display Modes |
#11
| |||
| |||
|
|
If I can provide simple classes like .r { text-align:right; } |
#12
| |||
| |||
|
|
Another pragmatic POV: I write HTML, JavaScript & CSS as the client-side rendering, and there are a team of developers who use what I write to make the application work. If I can provide simple classes like .r { text-align:right; } for them to place programatically as THEY need it, it simplifies the work for everyone involved. |
|
And if you store that class declaration as a constant, then all you have to do is change that single constant to change the way the site renders. |
#13
| |||
| |||
|
|
Harlan Messinger wrote: you want column headers to be bottom-center-aligned. .colhead { text-align: center; vertical-align: bottom; } Better would be to use proper column header markup, with <thead> and th> elements. Then you may not need class selectors at all. |
#14
| |||
| |||
|
|
kchayka wrote: Harlan Messinger wrote: you want column headers to be bottom-center-aligned. .colhead { text-align: center; vertical-align: bottom; } Better would be to use proper column header markup, with <thead> and th> elements. Then you may not need class selectors at all. At least not for headers. |
|
Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ | (first name) at ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ | ----------------------------------------------------------------------------- |
#15
| |||
| |||
|
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? |
|
Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ | (first name) at ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ | ----------------------------------------------------------------------------- |
#16
| |||
| |||
|
|
On Fri, 28 Apr 2006, Andy Dingley <dingbat (AT) codesmiths (DOT) com> wrote: 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. Oh, sure: long-winded HTML (i.e in this case with a class= on every damned table cell) is also no problem to anyone who can write a program to spew it out. 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 :-} |
|
Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ | (first name) at ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ | ----------------------------------------------------------------------------- |
#17
| |||
| |||
|
|
I write HTML, JavaScript & CSS as the client-side rendering, and there are a team of developers who use what I write to make the application work. If I can provide simple classes like .r { text-align:right; } for them to place programatically as THEY need it, it simplifies the work for everyone involved. And if you store that class declaration as a constant, then all you have to do is change that single constant to change the way the site renders. |
|
Granted, it's not exactly what CSS is best for, but sometimes you make the best use of the tools to accomplish a task it was never intended to accomplish. |
|
Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ | (first name) at ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ | ----------------------------------------------------------------------------- |
#18
| |||
| |||
|
|
On 27 Apr 2006 13:17:24 -0700, "Giggle Girl" <missgiggy (AT) gmail (DOT) com wrote: : My biggest fear is it will get expensive processor-wise. How much do you play for each millisecond? |
#19
| |||
| |||
|
|
On Fri, 28 Apr 2006, Tony wrote: Another pragmatic POV: I write HTML, JavaScript & CSS as the client-side rendering, and there are a team of developers who use what I write to make the application work. If I can provide simple classes like .r { text-align:right; } for them to place programatically as THEY need it, it simplifies the work for everyone involved. You're showing no indication of listening. In particular to the principle of separation of content from presentation, as designed into the HTML/CSS design. As such, it seems that further discussion with you would be pointless, and I'll try to keep that in mind from now on. |
|
And if you store that class declaration as a constant, then all you have to do is change that single constant to change the way the site renders. uh-uh, so next week you'd be happy to code stuff like: .r { text-align: center; } and .blue { color: yellow; } |
#20
| |||
| |||
|
|
In comp.infosystems.www.authoring.stylesheets Tony <tony23 (AT) dslextreme (DOT) whatisthis.com> wrote: | Granted, it's not exactly what CSS is best for, but sometimes you make | the best use of the tools to accomplish a task it was never intended to | accomplish. Sounds like you're not a programmer, and your programmers are not making good use of abstractions in their application design. |
![]() |
| Thread Tools | |
| Display Modes | |
| |