Forum:Css style of object with 2 classes

How do I write a css style so that an object will be styled a certain way if and only if it belongs to class A and class B simultaneously? Granpa 11:22, March 23, 2011 (UTC)


 * As long as Class A and Class B don't have similar attributes (for example, A has  and B has   in their definitions), then it is very possible. When making a class call simply say   as opposed to saying  . --daNASCAT http://images2.wikia.nocookie.net/__cb32675/wikia/images/e/e9/WikiaStaff.png  (help forum | blog) 13:19, March 23, 2011 (UTC)


 * I believe Granpa wants the object to get both classes only when both are called and none when none or only one is called. I'm guessing it's for an override for those default Wikia objects that use particular two classes. An example (preferably with links) of what is needed would make it easier for us to give an answer. Sovq 13:43, March 23, 2011 (UTC)


 * I think he's just looking for  for referencing an element with  . Be careful -   means something completely different.


 * Yup, I think so too, but if given an example of what is actually needed, there might be easier or more intuitive solutions and a more precise answer. Sovq 16:52, March 23, 2011 (UTC)

Well, I've wondered about this before but the example right now is a table with different color backgrounds for even and odd columns and even and odd rows. I thought I would create a class of even rows and another class for odd rows then create a class of even columns and a class of odd colums. Granpa 18:20, March 23, 2011 (UTC)