How to combine input after focus pure css

0 votes
I have an input field that requires specific gradient borders on focus. So, I've created this kind of border as the background color on the block and smaller background on: the after element. It works at the simple block but doesn't work on: focus.

.test:focus:after and .test:after:focus are not working.

Is there any solution?
Jun 1 in CSS by Edureka
• 11,040 points
203 views

1 answer to this question.

0 votes
One method is to create an element that may contain HTML content, such as span, and then apply the::after pseudo-element (or, in CSS 2.1, the:after pseudo-selector) to it.
answered Jun 1 by Edureka
• 9,540 points

Related Questions In CSS

0 votes
0 answers

How to resize an image in pure HTML/CSS while keeping its proportions?

How can I crop an image while ...READ MORE

Aug 18 in CSS by Edureka
• 11,040 points
35 views
0 votes
0 answers

How to combine bold and italic in CSS?

I learned how to make text bold ...READ MORE

Aug 23 in CSS by Edureka
• 11,040 points
16 views
0 votes
1 answer

How to build a special polygon (a kite shape) with HTML & CSS only?

I made two divs, one for Arc ...READ MORE

answered May 28 in CSS by Edureka
• 9,540 points
176 views
0 votes
1 answer

How to hide image broken Icon using only CSS/HTML?

Because CSS/HTML has no means of knowing ...READ MORE

answered May 31 in CSS by Edureka
• 9,540 points
55 views
0 votes
2 answers

Define a SQL query? What is the difference between SELECT and UPDATE Query? How do you use SQL in SAS?

HI.. SQL is Structured Query Language, which is ...READ MORE

answered Aug 8, 2020 in PHP by anonymous
5,047 views
0 votes
1 answer

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

Yes, you can.  Just Backslash (\) the colon.  Like ...READ MORE

answered Nov 14, 2018 in Others by DataKing99
• 8,240 points
1,731 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
• 52,350 points
296 views
0 votes
1 answer

How to create material design input form using css and bootstrap?

Try with this code. HTML: <div class="main_div"> ...READ MORE

answered Jun 21 in CSS by Edureka
• 9,540 points
320 views
0 votes
1 answer

How to set Bullet colors in UL/LI html lists via CSS without using any images or span tags

I use jQuery for this: jQuery('li').wrapInner('<span class="li_content" />'); & ...READ MORE

answered May 27 in CSS by Edureka
• 9,540 points
125 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP