Re: Attribute selector and IE6 -
05-13-2007, 09:54 PM
On May 11, 1:56 pm, Bergamot wrote:
> Maybe I'm dense, but I don't follow your reasoning. Your code:
>
> >
> > table.TableStyle COLGROUP[id="ColGroupEven"] { background-color: #DCDCDC; }
>
> Explain again why you can't do instead:
>
> table.TableStyle COLGROUP#ColGroupEven { background-color: #DCDCDC; }
No, it is me that is dense! Thanks very much for that example - for
some reason I hadn't realized that the ID selector syntax could be
attached to the end of a class/tag string in that fashion. I'm a
programmer, not a web designer, so I'm coming to CSS through the back
door, and none of the references I was looking at had selector
examples at that level of detail. I seem to remember trying something
similar in my testing, but I probably goofed the syntax.
Using this, I can now get the COLGROUP styling to work on IE6. I'd
seen warnings that some browsers had limited CSS support on COLGROUP,
but I think all of my target group support the limited things I'm
doing (background-color, etc).
By the way, the ID attribute is intended to be unique within a markup
document, but I've been using ColGroupEven and ColGroupOdd on
alternating COLGROUPs in a table. Of course it gives validation
warnings, but I can live with that if it lets me doing the alternating
colors on the columns. It doesn't look like this will cause me
problems with any of the major browsers?
Thanks again,
David Oberst, Yellowknife, NWT, Canada
|