Dorothy Hesson 2336 wrote:

> Aaah! I used Firebug to check inheritance. When I changed the class to
> (what the markup leads to...)
>
> #content p img.floatright  {
> float: right;
> margin: 0 0 10px 10px;
> }
>
> the image floats correctly! So, the issue is inheritance?

No, inheritance is not the issue. Rule of thumb: when people suspect 
that their CSS problem relates to inheritance, it usually doesn't; when 
they don't suspect it, it might.

It's simply a matter of writing the selector so that it matches the 
desired element. Here it does, though img.floatright or .floatright 
would probably do just as well (assuming you don't have other elements 
in class floatright).

Even specificity isn't involved. The point is that a rule simply has no 
effect if it matches no element (which was the problem with the img 
.floatright selector).

Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/ 

______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to