Is it valid to use / in a class name in html/css?
// html <div class="/10"></div> // css ./10{ float:left; }
You can use most unicode characters in both the class and id attributes in HTML.
This means you can indeed use / in a classname in HTML, but you will run into problems when trying to select it with ./10 in CSS, as you've likely found out yourself. If you escape the slash, you're golden! :)
.\/10 { float:left; } Check out http://mathiasbynens.be/notes/html5-id-class and http://mathiasbynens.be/notes/css-escapes
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With