PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, July 13, 2022

[FIXED] Why is my :focus not working? I have linked the CSS to the HTML properly, but also the input is not styled as per the stylesheet

 July 13, 2022     css, focus, hover, html, web-deployment     No comments   

Issue

This is just an example. I wanted the border of input to be rounded when it is clicked. But it did not happen.

.username {
    border-radius: 0%;
}
.username :focus{
    border-radius: 30%;
}
<input class="username" type="text" placeholder="Username or Email">


Solution

Get rid of the space between username and focus. .username:focus{} the pseudo may be :active actually.

.username:active {
   color: red;
}


Answered By - zero298
Answer Checked By - Katrina (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing