![]() | |
![]() |
| | Thread Tools | Display Modes |
#11
| |||
| |||
|
#12
| |||
| |||
|
|
The closest I can think of is attribute selectors. http://www.w3.org/TR/CSS21/selector....bute-selectors [att=val] Match when the element's "att" attribute value is exactly "val". However I don't think you can have content as the att. |
#13
| |||
| |||
|
|
That's the best solution so far. I'll have to come up with a set of behaviors for our site. Thank you! |
#14
| |||
| |||
|
|
jpolaski (AT) rgs (DOT) uci.edu wrote: I'd like to change the color of text in a table data field based on the content... For example, I'd like all <td>pos</td> to show the "pos" in red. All td>pending</td> should show as the normal black. I don't really want to have to add a class or a style, but that's how I've been doing it so far... I seem to remember that this is possible, I just can't remember the syntax right now and I'm not having any luck with google... Thanks in advance, Use behaviors IE 5.5 or higher Firefox 1.0 or higher Camino 1.0 or higher any other modern Gecko based browser Netscape 8.0 or higher |
#15
| |||
| |||
|
|
Use behaviors IE 5.5 or higher Firefox 1.0 or higher Camino 1.0 or higher any other modern Gecko based browser Netscape 8.0 or higher [demo snipped] Seems like an awful lot of work to use a behavior for this. Wouldn't it be easier to take the working part of it and stick it in a script? function adjustTable(table) { var tds = table.getElementsByTagName("td"); var iTD; for (iTD = 0; iTD < tds.length; iTD++) { switch ... } } |
|
If the scope should be restricted to particular columns, then you approach of going methodically through the TBODY and then TRs makes sense. |
#16
| |||
| |||
|
#17
| |||
| |||
|
|
Running Apple programs on a PC doesn't work, even if you were thinkig of using an emulator jpolaski (AT) rgs (DOT) uci.edu wrote: No, it doesn't work. Yes, that's what I was originally thinking of. As things stand now, there is no easy solution. Is your car running? Or maybe you could take public transportation? Otherwise, how are you going to get to work? jpolaski (AT) rgs (DOT) uci.edu wrote: No, it doesn't work. Yes, that's what I was originally thinking of. As things stand now, there is no easy solution. Such a radical change is likely to cause problems. Maybe we should consider a more measured approach. jpolaski (AT) rgs (DOT) uci.edu wrote: No, it doesn't work. Yes, that's what I was originally thinking of. As things stand now, there is no easy solution. |
![]() |
| Thread Tools | |
| Display Modes | |
| |