How do I remove the text underline (that I set myself) from a on hover?


Tags: jquery,css,html

Problem :

I want to have a link but I want to have a jQuery event fire onclick so I am using a <span> with an id instead of a link so I can listen for the click event.

I want to make the <span> look like a link so:

  1. The cursor should show a hand when the <span> is hovered
  2. The <span> should be underlined and blue

This works fine in CSS, but I want to remove the underline when I hover. How would I do this in CSS?



Solution :

span:hover {
    text-decoration: none;
}

    CSS Howto..

    Asp.Net how to apply a css style to all the control of it's kind

    How can I have an image float next to a centered div?

    How I can change the CSS properties of HTML elements in run time using JavaScript or PHP?

    How to set relative url for a css file in Django

    How to control the text inside DIV tag by not allowing the text to be increased?

    How to get opaque text on div with transparency?

    How to match element containing another element?

    How to remove the vertical white line between the two green divs without floating?

    How do i include font awesome classes in my css file?

    How to align multiple images horizontally (in a row)?

    How do I use PHP to apply css properties? [closed]

    How do I get this HTML canvas animation to appear on top of my image?

    How to center this by using css?

    How to write syntax in internal css to external css?

    how to apply the css style only to child

    “div” into an “a” is wrong. So, how can I do this? (HTML4, CSS2, crossbrowser)

    How to place circle and text in one line?

    How to make a div fade on hover?

    Displaying a title and description on a jquery slideshow

    How to make a div and its children to ignore its parent styles?

    How to apply icons to links using css?

    How to get text in css to appear in the vertical middle

    How to edit WordPress CSS written as inline CSS? [duplicate]

    CSS: overlay looks fine on Chrome, but not in Firefox 3: how do I fix the vertical offset?

    How do I line up my textboxes without using a table? html/css

    How to make and use LESS templates?

    CSS: How to force objects to stay inside container but allow full width background? [duplicate]

    How to change value of class in another class?

    How to display just part of image on hover?

    How to make a child div alone responsive using css?