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,550 points
138 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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,100 points

Related Questions In Others

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,570 points
10 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
29 views
0 votes
1 answer
0 votes
1 answer

How to unistall a file in Linux?

You can uninstall a file using the ...READ MORE

answered Mar 8 in Others by Nabarupa
38 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
• 35,750 points
45 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,330 points
16 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
• 27,620 points
35 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
24 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,100 points
71 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.