Use CSS to make a span not clickable

Actually, you can achieve this via CSS. There’s an almost unknown css rule named pointer-events. The a element will still be clickable but your description span won’t.

a span.description {
    pointer-events: none;
}

there are other values like: all, stroke, painted, etc.

ref: http://robertnyman.com/2010/03/22/css-pointer-events-to-allow-clicks-on-underlying-elements/

UPDATE: As of 2016, all browsers now accept it: http://caniuse.com/#search=pointer-events

UPDATE: As of 2022, browsers behavior may have changed, another option can be:

a {
    pointer-events: none;
}
a span:not(.description) {
    pointer-events: initial;
}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)