tags:

views:

269

answers:

7

Hi everobody,

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 CSS :

.info{
    position:absolute;
    border:none;
}

a.info{
    position:absolute; 
    z-index:24; 
    background:none;
    color:#000;
    text-decoration:none
}

a.info:hover{
    z-index:25; 
    background-color:#FFF;
    cursor:help;
}

a.info span{
    display: none
}

a.info:hover span{ 
    display:block; 
    position:absolute;
    cursor:help;
    bottom:0px; 
    left:26px; 
    width:150px;
    padding:4px;
}

cd

+8  A: 

Try this:

img{border:0px;}

You can also limitate the scope and only remove border on some images by doing so:

.myClass img{border:0px}

More information about the border css property can by found here.

Edit: as mentioned in the comments, you could also do :

img{border:0;}
marcgg
Am going to use "limitate" somewhere.
random
`border: 0px` is the way for removing borders (instead of `border: none`)!
Veger
In terms of optimization border: 0 no need for the 'px'
UberNeet
@uberneet : that's true. I like adding px so that it's easy to change in firebug in case I want to increase the size later dynamically. I edited my answer to mention it thought
marcgg
A: 

What class do you have on the image tag?

Try this

<img src="/images/myimage.jpg" style="border:none;" alt="my image" />
Andrew
A: 

I do believe you need to add the border: none style to your icon element as well.

vonolsson
+1  A: 

maybe add border:none to under a.info:hover span or text-decoration:none

jkeesh
A: 

I usually use this on the top of css file.

img {
   border: none;
}
Petr Peller
A: 

Thank for answers,

border is "destroy" (sorry for my english) under IE, but under FF, it still again. So, I try this :

.clearBorder{border:none;} and I add this class to the img, and it rules.

bahamut100
+1  A: 

it's a good idea to use a reset CSS. add this at the top of your CSS file

img, a {border:none, outline: none;}

hope this helps

pixeltocode