How to get rid of border around and image used as a link in Firefox?

此生再无相见时 提交于 2019-12-05 05:15:04

Links (<a>’s) by default have a dotted outline around them when they become “active” or “focused”. In Firefox 3, the color is determined by the color of the text

To remove it, simply use:

a {
    outline: none;
}

Or you can do what I do, and remove it from all elements (I use my own focus/active rules) and do

* {
    outline: none;
}

This will remove it from all elements.

#link img a
{
border:0;
outline:none;
}

Install Firebug and see what's going on. I think what's going on is img tag probably has a default border.

To remove it maybe you can try putting your a and img tags inside of a div with an id and using following CSS:

Your HTML:

<div id="test">
  <a...>
  <img .../>
  </a>
</div>
And use the following CSS:

#test img { 
  border-style: none; 
}

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!