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
561 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, 2019 in Others by Eighteen
• 120 points
247 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,160 points
114 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
61 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
63 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,830 points
90 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 47 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 38 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
57 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
247 views