Philio
05-21-2006, 09:52 PM
I have a number of <span> elements which I am using to call a JS function with an onclick event, however it seams that the onclick only works if you click on the actual text not the entire span area, anyone know if there is a way round this?
maxymizer
05-22-2006, 02:03 AM
<span> element is an inline level element, meaning that it wraps arround text and depends on text length (it determines its width and height).
Use <div> element or make <span> element(s) block level by using CSS:
span {display: block;}
Philio
05-22-2006, 07:35 AM
Yer I have tried that it doesnt seam to work properly all the span's start overlapping each other.
JBelthoff
05-22-2006, 12:30 PM
You could try giving your span or your div a height and width style.
:peace:
maxymizer
05-22-2006, 07:38 PM
Validate your HTML and CSS Philio, there might be something that's left unclosed. Also, if you're using floating spans, make sure you clear the float..
fozzy
05-23-2006, 08:51 AM
I seem to recall noticing some slightly different behaviour in different browsers (IE vs Firefox). I don't recall exactly what was different off hand.
What browser are you using for testing (more then one browser?)? Which browser are you noticing the problem in?