![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Is it possible to apply a style to a div that has exactly two CSS Classes? |
|
div class="A B">Test 1</div div class="A">Test 2</div I want to change the background color of the first div because it has classes A and B applied. |
|
I need to be able to create like a composite class ... I think this is not possible. Just checking. |
#3
| |||
| |||
|
|
Hello, Is it possible to apply a style to a div that has exactly two CSS Classes? div class="A B">Test 1</div div class="A">Test 2</div I want to change the background color of the first div because it has classes A and B applied. |
#4
| |||
| |||
|
|
shapper wrote: Is it possible to apply a style to a div that has exactly two CSS Classes? Of course. div class="A B">Test 1</div div class="A">Test 2</div I want to change the background color of the first div because it has classes A and B applied. What's the problem? You can use either the selector .A or the selector .B, or even the selector div - or the selector *, to take things into the extreme. I need to be able to create like a composite class ... I think this is not possible. Just checking. I think you are not really describing the problem. I guess you mean that the CSS rules should _only_ apply to a div that has both classes. For this, you would just the selector div.A.B -- Yucca,http://www.cs.tut.fi/~jkorpela/ |
#5
| |||
| |||
|
|
As usual, it does not work in IE 6 ... |
|
Does anyone has some statistics for how IE 6 is still used? |
|
Do you still care about IE6 or not? |
#6
| |||
| |||
|
|
shapper wrote: As usual, it does not work in IE 6 ... So what? You remember the usual CSS caveats, don't you? Does anyone has some statistics for how IE 6 is still used? Lies, blatant lies, statistics, Internet statistics - do you really want to go that way? Do you still care about IE6 or not? You haven't told which kind of optional presentational suggestions (whichis all you can say in CSS) you are trying to make, so how could _we_ decide whether it matters that the most common (?) browser ignores them? And you haven't explained why you would need to use a two-class selector instead of something more robust. -- Yucca,http://www.cs.tut.fi/~jkorpela/ |
#7
| |||
| |||
|
|
shapper wrote: As usual, it does not work in IE 6 ... So what? You remember the usual CSS caveats, don't you? Does anyone has some statistics for how IE 6 is still used? Lies, blatant lies, statistics, Internet statistics - do you really want to go that way? |
#8
| |||
| |||
|
|
Lies, blatant lies, statistics, Internet statistics - do you really want to go that way? If, for example, the statistics for a government website that receives over 40,000 visits a day show that 28% of the requests from IE are currently from IE6 (as is the case), the actual usage may be 35% or 25% or 20% |
|
So the information is useful as long as one is aware of the margin of error involved. |
#9
| |||
| |||
|
|
Harlan Messinger wrote: Lies, blatant lies, statistics, Internet statistics - do you really want to go that way? If, for example, the statistics for a government website that receives over 40,000 visits a day show that 28% of the requests from IE are currently from IE6 (as is the case), the actual usage may be 35% or 25% or 20% Or something else. Moreover, which "actual usage"? Usage when accessing that site, or web access in general? One site's statistics, even if it were meaningful in its own context, says nothing about another site's usage. By the way, according to most statistics I've seen, IE 6 is still more common than IE 7, or about equally common. Anything older than IE 6 is almost ignorable by now, which is of course good news to authors. So the information is useful as long as one is aware of the margin of error involved. Which margin of error? You don't know it. You _might_ have a reasonable good estimate of the margin error for a _site_ (that is, you might be able to say that with reasonable probability, visits to a particular site are made with, say, IE 6 in 40 - 60 % of cases. But regarding web usage in general, what would you base the estimates on? Gut feeling? Then please don't use pseudostatistical terms like "margin of error". |
#10
| |||
| |||
|
|
Absent any particular reason to think that the millions of otherwise diverse people with IE6 have substantially different browsing habits from the millions of otherwise diverse people with IE7, it's a reasonably good estimate |
|
That isn't a gut feeling, it's a statistically sound observation. |
![]() |
| Thread Tools | |
| Display Modes | |
| |