Handling a colon in an element ID in a CSS selector
Posted
by sblundy
on Stack Overflow
See other posts from Stack Overflow
or by sblundy
Published on 2008-09-23T16:47:20Z
Indexed on
2010/05/13
22:24 UTC
Read the original article
Hit count: 149
JSF is setting the ID of an input field to search_form:expression
. I need to specify some styling on that element, but that colon looks like the beginning of a pseudo-element to the browser so it gets marked invalid and ignored. Is there anyway to escape the colon or something?
input#search_form:expression {
///...
}
© Stack Overflow or respective owner