Timeline for Styling elements with a dot (.) in the class name
Current License: CC BY-SA 2.5
14 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 24, 2020 at 20:11 | comment | added | Donald Duck | Today all major browsers support it (Chrome, Firefox, Edge, Safari). | |
Mar 12, 2017 at 19:16 | comment | added | That Realty Programmer Guy |
@algorhythm guess you can use both selectors, eg, .a\.b, .a\\.b { }
|
|
Dec 31, 2016 at 0:57 | comment | added | Sunry | ID name with dot also need this way to escape. | |
May 17, 2013 at 9:31 | comment | added | algorhythm | In Google Chrome I get it to work with double backslashes... => .a\\.b {} | |
Apr 16, 2013 at 10:07 | comment | added | David Harkness |
@RoToRa - I was addressing dotty's latest comment: "a 'span' with the class of .a.b ". This is where meaningless names like a and b make examples unclear.
|
|
Apr 16, 2013 at 7:45 | comment | added | RoToRa |
@DavidHarkness Yes, but the class name in question is a.b not .a.b .
|
|
Apr 15, 2013 at 17:31 | comment | added | David Harkness |
For a class name of .a.b you would actually need span.\.a\.b .
|
|
May 19, 2011 at 14:35 | vote | accept | dotty | ||
Aug 11, 2010 at 12:12 | comment | added | RoToRa |
You need to escape the dot that is part of the class name with a backslash, thus in this case: span.a\.b . Example: jsfiddle.net/Mrafq/1
|
|
Aug 10, 2010 at 9:47 | comment | added | dotty | 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? | |
Aug 10, 2010 at 9:11 | comment | added | bobince | It was IE5.x, and early versions of Opera, that didn't support this. | |
Aug 10, 2010 at 9:01 | comment | added | RoToRa | I'm not sure (thus the "could"). However IE6 surprisingly does. | |
Aug 10, 2010 at 8:55 | comment | added | dotty | like? Would firefox 1.5 +, Safari 3+ and IE 6+ support it? | |
Aug 10, 2010 at 8:54 | history | answered | RoToRa | CC BY-SA 2.5 |