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

329
Views
Is there a way to disable the <a> link preview in css?

Whenever you hover over a link it shows the thingy with the link in it at the bottom left of the web browser, How would you disable this?. I am hoping to use as little javascript as possible, but if I have to use it that's fine.

Here is the css I currently have for my navbar buttons. if needed.

.navbar ul li a {
    text-decoration: none;
    color: rgb(255, 255, 255);
    font-size: 20px;
    padding: 5px;
    border-radius: 5px;
    transition: all 0.1s ease-in-out;
}

.navbar ul li a:hover {
    color: rgb(255, 166, 0);
    background-color: rgb(85, 85, 85);
}

I would like to have it not show up, just to make the website look a little bit cleaner.

about 4 years ago · Santiago Gelvez
1 answers
Answer question

0

The only way to do this is to remove the data in 'href', and change it to a javascript onlick where you set the window.location to the url you want.

<a href="http://www.stackoverflow.com/">Go To SO</a>

becomes

<a style="cursor: pointer" onclick="javascript: window.location = 'http://www.stackoverflow.com/';">Go To SO</a>

p.s. Doing it via JavaScript is probably the only way to disable the URL display, but this raises the question of why? URL display is a valid and important thing, and disabling it is not good for user experience.

about 4 years ago · Santiago Gelvez 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!