Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Turn Off Alt Tags On Links With CSS?

Tags:

css

This website that I'm working on has annoying alt tags popping up when you hover over links in the sidebar. I didn't put these alt tags in. But, I can control the CSS... Is there anyway to disable them?

Thank you!

Tara

like image 819
Tara Avatar asked May 03 '11 14:05

Tara


1 Answers

Simple answer: no

They are impossible to turn off just with CSS. They are browser dependant and are not part of any CSS spec i.e. you can't style them, hide them, anything.

Though you can get rid of them by Javascript:

Javascript

var elements = document.getElementsByTagName('a');

for (var i = 0, len = elements.length; i < len; i++)
{
  elements[i].removeAttribute('title');
}
like image 139
Gary Green Avatar answered Oct 19 '22 01:10

Gary Green