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
708 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,150 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, 2019 in Others by Eighteen
• 120 points
371 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, 2019 in Others by Vardhan
• 13,200 points
124 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, 2019 in Others by Frankie
• 9,810 points
76 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, 2019 in Others by Nabarupa
73 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
• 51,850 points
96 views
0 votes
1 answer

What is the difference between span and div?

The div should be used to wrap sections of ...READ MORE

answered Jan 16 in Web Development by Niraj

edited Jan 21 by Niroj 83 views
0 votes
1 answer

How many methods of including css in an HTML document?

Hello fignithi, yes!!,you can use external file for css ...READ MORE

answered Jan 16 in Web Development by Niraj

reshown Jan 16 by Sirajul 45 views
0 votes
1 answer

Do all HTML tags come in a pair?

HTML tags can be of two types: 1.Paired ...READ MORE

answered Jan 16 in Web Development by anonymous
170 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,150 points
291 views