Log in

View Full Version : overriding style to remove underline for mousover captions



suzannew
11-01-2010, 06:20 PM
Popup Image Viewer question
http://www.dynamicdrive.com/style/csslibrary/item/css-popup-image-viewer/

I'm using above coding on my webpage for mouseover images. The captions are displaying underlined; how do I remove that? I'm guessing that the underlining is coming from a style related to the <a> tag, but I haven't specified a style for this in the css.

I was able to override the font type (but not the underlining) in the css for the thumbnails:

.thumbnail span{ /*CSS for enlarged image*/
position: absolute;
background-color: lightyellow;
padding: 5px;
left: -1000px;
border: 1px gray;
visibility: hidden;
color: black;
font-family: Verdana;
font-size: 10px;
font-style: normal;
}


Thanks!

bluewalrus
11-01-2010, 09:24 PM
Its a default, you need to add text-decoration:none; to the a.

You can do it as


a:hover {
text-decoration:none;
}

or be more specific if you do want it other places


a:hover .thumbnail span{
text-decoration:none;
}

Assuming the a contains the class and the span is within the a.

suzannew
11-02-2010, 02:05 PM
thanks, that worked!