tags:

views:

55

answers:

1

Hay I have an element like this

<span class='a.b'>

Unfortunately this class name comes from an eCommerce application and cannot be changed.

Can i style a class name with a dot in it?

like

.a.b { }

Any advice would be great

Thanks

+4  A: 
.a\.b { }

However there could be browsers around that don't support this.

RoToRa
like? Would firefox 1.5 +, Safari 3+ and IE 6+ support it?
dotty
I'm not sure (thus the "could"). However IE6 surprisingly does.
RoToRa
It was IE5.x, and early versions of Opera, that didn't support this.
bobince
This doesn't seem to work at all. Say i want to style span.a.b (a 'span' with the class of '.a.b'), how would i do that?
dotty
You need to escape the dot that is part of the class name with a backslash, thus in this case: `span.a\.b`. Example: http://jsfiddle.net/Mrafq/1/
RoToRa