+ 2

Please suggest the error in my code.

On hover at the button, why the 4 corners are visible for faction of a second. This is to be corrected. Your help is required. The code is:- https://code.sololearn.com/W6b4knROx81J/?ref=app

23rd Feb 2020, 3:26 PM
Dushyant Kumar Tyagi
Dushyant Kumar Tyagi - avatar
22 Antworten
+ 5
You don't exactly need to use a tag if you are not willing to redirect user to somewhere. Simply replace them with a block level element. Eg: <p> And obhiously output would differ in android, ios and pc👍, nice point there!
23rd Feb 2020, 8:13 PM
NightFox
NightFox - avatar
+ 4
Please link a code.
23rd Feb 2020, 3:49 PM
NightFox
NightFox - avatar
+ 3
Dushyant Kumar Tyagi It seems that we both learn something new today.
23rd Feb 2020, 7:00 PM
ODLNT
ODLNT - avatar
+ 2
Finding difficulty in copying the code. Finally succeeded. Please refer the code . I have edited the post.
23rd Feb 2020, 3:51 PM
Dushyant Kumar Tyagi
Dushyant Kumar Tyagi - avatar
+ 2
Add border-radius:50px; to a:hover:before
23rd Feb 2020, 4:11 PM
ODLNT
ODLNT - avatar
+ 2
Well, that is coming from <a> tag you're using. When user clicks a tag it makes a box around it to show it is been clicked. You can use button tag instead of a tag, which is more suitable for it.
23rd Feb 2020, 4:24 PM
Raj Chhatrala
Raj Chhatrala - avatar
+ 2
Dushyant Kumar Tyagi I was using an iOS device when I first looked at your code and adding the border-radius solved the problem on my iOS device. But the android app is different and Rick Grimes is correct when he suggests using a button tag. You can nest the <a> tag inside of the button tag and remove the focus outline. That should solve the four corners problem. https://code.sololearn.com/Wm2sl2tH2E4k/#html
23rd Feb 2020, 6:08 PM
ODLNT
ODLNT - avatar
+ 2
Yes it worked. Thank for that. But there seems to be whitish border of marginal thickness of about 2px, covering the left & top of the button on hover. How to cancel it?
23rd Feb 2020, 6:22 PM
Dushyant Kumar Tyagi
Dushyant Kumar Tyagi - avatar
+ 2
Absolutely perfect!! 100% solution done. And thanks a lot . It helped me today in my learning.
23rd Feb 2020, 6:40 PM
Dushyant Kumar Tyagi
Dushyant Kumar Tyagi - avatar
+ 2
That sounds great, Im glad I could help.
23rd Feb 2020, 6:44 PM
ODLNT
ODLNT - avatar
+ 2
I'm glad that things worked out for you, but you don't need to wrap the <a> tag inside <button> tag, you just need button tag. Since you won't be able to use href with button tag, you can use window.location.href on onclick event.
23rd Feb 2020, 6:48 PM
Raj Chhatrala
Raj Chhatrala - avatar
+ 2
Yes, exactly.
23rd Feb 2020, 7:06 PM
Dushyant Kumar Tyagi
Dushyant Kumar Tyagi - avatar
+ 2
Omar Samir Please post answers related to this question.
25th Feb 2020, 12:30 PM
NightFox
NightFox - avatar
+ 2
Marzan thanks:
25th Feb 2020, 1:13 PM
Dushyant Kumar Tyagi
Dushyant Kumar Tyagi - avatar
+ 1
Dushyant Kumar Tyagi If you don't mind, will you please let me know what device you are using?
23rd Feb 2020, 4:45 PM
ODLNT
ODLNT - avatar
+ 1
Smartphone
23rd Feb 2020, 5:07 PM
Dushyant Kumar Tyagi
Dushyant Kumar Tyagi - avatar
+ 1
Correct. I am working on that.
23rd Feb 2020, 6:11 PM
Dushyant Kumar Tyagi
Dushyant Kumar Tyagi - avatar
+ 1
add border:0; to botton{}
23rd Feb 2020, 6:34 PM
ODLNT
ODLNT - avatar
+ 1
Correct
23rd Feb 2020, 6:51 PM
Dushyant Kumar Tyagi
Dushyant Kumar Tyagi - avatar
+ 1
Any one arbic
25th Feb 2020, 5:18 AM
Omar Samir
Omar Samir - avatar