Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

91
Views
Prevent an element hidden when it clicked

I made an element with visibility: hidden, it turn out visibility: visible when its :hover. It works perfectly on desktop view, but on mobile web it will dissappear when the element being clicked. How can I resolve this? Only set to hidden/dissapear when we click outside the element or the close button.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

:hover doesn't fire in mobiles, since mobiles are only click. (You got nothing to hover with!)

Luckily, if you use :active selector in combination with :hover you can achieve this as long as the :active is after :hover.

.element:hover, .element:active{
   visibility: visible;
 }
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!