![]() | |
#31
| |||
| |||
|
|
On Tue, 2 May 2006, Steve Pugh wrote: As for halving the amount of CSS. What did you have in mind? I considered setting a default cell colour and the over riding that for particular cells. Something along those lines, indeed. But as td+td matches the second and subsequent cells that seemed to be a dead end. The trick, as far as the rows is concerned, is to note that they all start with a th. So th+td matches precisely the first data cell, th+td+td matches the second, and so on. |
|
You get similar effects with the rows, however, so you need some way to anchor the sectors which currently say tr+tr and so on. |
#32
| |||
| |||
|
|
"Alan J. Flavell" <flavell (AT) physics (DOT) gla.ac.uk> wrote: On Tue, 2 May 2006, Steve Pugh wrote: As for halving the amount of CSS. What did you have in mind? I considered setting a default cell colour and the over riding that for particular cells. Something along those lines, indeed. But as td+td matches the second and subsequent cells that seemed to be a dead end. The trick, as far as the rows is concerned, is to note that they all start with a th. So th+td matches precisely the first data cell, th+td+td matches the second, and so on. Cunning. You get similar effects with the rows, however, so you need some way to anchor the sectors which currently say tr+tr and so on. tr:first-child+tr perhaps? |
#33
| |||
| |||
|
|
phil-news-nospam (AT) ipal (DOT) net> kirjoitti viestissä:e33or8111ca (AT) news1 (DOT) newsguy.com... snip For another issue with CSS, take a block of text in a _single_ DIV element and using CSS only, style that block so it appears with a drop shadow effect without changing the HTML at all. http://www.kolumbus.fi/ace/ng/box.html Div with heading and paragraph of text inside. If you add more paragraphs it needs tweaking though. |
#34
| |||
| |||
|
|
Now, here's something odd that I pondered on: Unicode has two sets of chess pieces, called "white" and "black". See the set at e.g http://ppewww.ph.gla.ac.uk/~flavell/...a26.html#x2654 (assuming you have a capable font). If you exhibit them on a black background, they disappear (not surprisingly). If you style a "black" one white, on a black background, then it looks like a white piece. Which leaves only the "white" one, styled white, to represent the black piece on a black background. http://ppewww.ph.gla.ac.uk/~flavell/tests/chessfun.html This would surely be confusing content with presentation ;-) |
#35
| |||
| |||
|
| http://ppewww.ph.gla.ac.uk/~flavell/tests/chessfun.html This would surely be confusing content with presentation ;-) I can't see those characters in my browser (firefox 1.5 on windows server 2003). I just get question marks instead. Is there a way to fix that - eg. changing fonts? |
|
Anyway, one way round this problem I would think would be to use spans or divs to contain the chess pieces, and use css content. I would expect it to work in firefox. I you were able to turn than into an example page showing all the chess pieces on the chess board in starting places I'd be pretty impressed. |
#36
| |||
| |||
|
|
This is a fairly pathological example in any case. It's more common in my experience to want to colour rows or columns, enabling the classes to be moved out to tr or col, for more concise html. |
|
Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ | (first name) at ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ | ----------------------------------------------------------------------------- |
#37
| |||
| |||
|
|
"Alan J. Flavell" <flavell (AT) physics (DOT) gla.ac.uk> wrote: On Tue, 2 May 2006, Chris Sharman wrote: I agree, it's gross. Yes, but I found it quite entertaining. I suspect that it's possible to halve the quantity of CSS without having to work too hard, but it's still gross.. Hmm, how insulted should I be by everyone calling it gross? :-o |
|
It was a quickly thrown together demo to show that even with the highly artificial constraint of only setting a class on the table element CSS could do what was being asked. In reality I would use more classes and dream about the days when CSS3 :nth-child selectors are supported. |
|
Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ | (first name) at ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ | ----------------------------------------------------------------------------- |
#38
| |||
| |||
|
|
phil-news-nospam (AT) ipal (DOT) net wrote: On Tue, 2 May 2006 00:49:04 +0300 "W?rm" <nomailstodragon (AT) north (DOT) invalid> wrote: | If it's tabular data, use table. It's that simple. I cannot say that it _is_ tabular data. I can say that it needs the same _behaviour_ as tabular data. Then the HTML table elements would not be appropriate. But you could use the CSS table stuff. Don't blame CSS for not offering presentation characteristics you need, when in fact it's some user agent(s) that lack(s) implementation. |
|
Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ | (first name) at ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ | ----------------------------------------------------------------------------- |
#39
| |||
| |||
|
|
So DIV with heading and list of links, three columns split in 3 divs floated, and in each column those div boxes with heading + list of links... |
|
Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ | (first name) at ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ | ----------------------------------------------------------------------------- |
#40
| |||
| |||
|
|
phil-news-nospam (AT) ipal (DOT) net wrote: On Tue, 02 May 2006 09:54:54 +0200 Johannes Koch <koch (AT) w3development (DOT) de> wrote: | Then the HTML table elements would not be appropriate. But you could use | the CSS table stuff. Don't blame CSS for not offering presentation | characteristics you need, when in fact it's some user agent(s) that | lack(s) implementation. Why would there be 2 different non-depricated mechanisms in the standards that accomplish exactly the same thing? Because they are two different things: One (HTML tables) is markup for tabular data. E.g. it includes the "Table rendering by non-visual user agents" (HTML 4.01, section 11.4). The other (CSS table presentation model) is just for presenting content in a certain way (a grid). |
|
Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ | (first name) at ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ | ----------------------------------------------------------------------------- |
![]() |
| Thread Tools | |
| Display Modes | |
| |