In the HTML code there is a div like:
<div id="xxx.yyy">...</div>
I want to specify the style in a css file. How can I get a reference to this div? The following does not seem to work:
#xxx.yyy {
}
Thanks
#xxx\.yyy {
}
Should do the trick. No harm done in using dots in CSS id names
You could also do something like this...
div[id="xxx.yyy"] {
/* your styles here */
}
The spec says it all: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
jsFiddle: http://jsfiddle.net/UnsungHero97/mjGzQ/
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