Using/Handling colon inside a JSF generated HTML element ID in CSS selector

0 votes

The ID of an input field to search_form:expression is being set by JSF and I need to style that element. 

But, if I use a colon, it gets regarded as beginning a pseudo-element to the browser and so, it gets marked invalid and is ignored every time. Is it possible to escape this colon somehow? TIA!

input#search_form:expression {
  ///...
}
Nov 14, 2018 in Others by Bharani
• 4,560 points
366 views

1 answer to this question.

0 votes

Yes, you can. 
Just Backslash (\) the colon. 
Like this:

input#search_form\:expression {  ///...}

Also, do check: Namespaces with CSS (MSDN)

answered Nov 14, 2018 by DataKing99
• 8,130 points

Related Questions In Others

0 votes
0 answers

Can we write AES enryption in Javascript and Decryption in Java using a static SALT and IV

I'm working on AES encryption I want to ...READ MORE

Jun 3 in Others by Eighteen
• 120 points
116 views
0 votes
1 answer

How to apply zoom animation for each element of a list in angular?

Hey @Sid, do check if this link ...READ MORE

answered Jul 30 in Others by Vardhan
• 12,820 points
85 views
0 votes
1 answer

What is a name function in JavaScript & how to define it?

A named function declares a name as ...READ MORE

answered Mar 6 in Others by Frankie
• 9,810 points
37 views
0 votes
1 answer

Change the permission for a file created by me in linux

If you are the system administrator or ...READ MORE

answered Mar 8 in Others by Nabarupa
50 views
0 votes
1 answer

What is a css selector and where is it used?

CSS Selector is a combination of element ...READ MORE

answered Nov 21, 2018 in Data Analytics by Kalgi
• 45,780 points
75 views
0 votes
1 answer

How blockchain hides it's HTML source?

When you click View Source, you see ...READ MORE

answered Jul 17, 2018 in Blockchain by Shashank
• 10,350 points
40 views
0 votes
1 answer

Vertically centering text in a div

Try this code: .smallUnitBox { ...READ MORE

answered Sep 3, 2018 in Blockchain by digger
• 26,600 points
57 views
0 votes
1 answer

Using Post and Get for Embedded System Communication

Twitter would be a great place to ...READ MORE

answered Sep 4, 2018 in IoT (Internet of Things) by anonymous2
• 4,260 points
60 views
0 votes
1 answer
0 votes
1 answer

Using unserialize in PHP throws the same error repeatedly

I googled 'Node no longer exists', and ...READ MORE

answered Nov 14, 2018 in Others by DataKing99
• 8,130 points
183 views