Skip to main content
edited tags
Link
BoltClock
  • 722.2k
  • 165
  • 1.4k
  • 1.4k
Post Closed as "Duplicate" by BalusC css
Source Link
sblundy
  • 61.3k
  • 22
  • 123
  • 124

Handling a colon in an element ID in a CSS selector

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 {
  ///...
}