Sent by Jeff Chastain on 21 September 2005 18:06
Well, you learn something new every day. I knew an id had preference over a class, I just assumed
since I specified the class which was nested inside, that I would be good. Makes the style sheet a
bit uglier, but that works.
Thanks
-- Jeff
----------------------------------------
From: "Tom Livingston" [EMAIL-REMOVED]>
Sent: Wednesday, September 21, 2005 12:33 PM
To: [EMAIL-REMOVED]
Subject: Re: [css-d] Weird inheritance issue?
On Wed, 21 Sep 2005 13:23:57 -0400, Jeff Chastain
wrote:
> When I do this, all three blocks still have a red border. The weird
> thing is that if I change the 'class="photoBlock'" to 'id="photoBlock"'
> and update the styles accordingly,
> I have red and blue blocks. Why does this not work for a class, but
> will work for an id (which I can't use as there are multiple
> 'photoBlock's)?
IIRC, ID has higher specifity than class. So it rules. Did you try:
#container .photoBlock .crWrapper { border: 1px solid #00f; }
HTH
--
Tom Livingston
Senior Multimedia Artist
Media Logic
www.mlinc.com
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/