How remove border around image in css?

后端 未结 14 2510
后悔当初
后悔当初 2020-11-29 09:46

I try to display a span when the cursor of the mouse is on a help icon.

It works, but nevertheless, I don\'t manage to remove the border around the icon.

My

14条回答
  •  抹茶落季
    2020-11-29 10:36

    I realize this is a very old post, but I encountered a similar issue in which my displayed image always had a border around it. I was trying to fill the browser window with a single image. Adding styles like border:none; did not remove the border and neither did margin:0; or padding:0; or any combination of the three.

    However, adding position:absolute;top:0;left:0; fixed the problem.

    The original post above has position:absolute; but does not have top:0;left:0; and this was adding a default border on my page.

    To illustrate the solution, this has a white border (to be precise, it has a top and left offset):

    
    

    This does not have a border:

    
    

    Hopefully this helps someone finding this post looking to resolve a similar problem.

提交回复
热议问题