Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

HTML CSS <span> how to get span to have scope over a DIV

Avatar of willsherwood
willsherwood asked on
Web Languages and StandardsJavaScriptCSS
3 Comments1 Solution342 ViewsLast Modified:
I have a mouseover effect that works well for a span i have that spans text.
I'd like the hover effect to occur whenever the mouse is over any part of the rectangle area for the encompassing DIV.
I realize that SPANs are more for text, but is there another way to accomplish the scope for the DIV?

I've included the skeletal structure below.   Currently the onMouseOver works fine for hovering over the text.  I would like to somehow have the hover effect be triggered for mousing over anywhere in the Bar19 rectangular area.   I couldn't get anywhere by putting the span and/or mouseover surrounding or in combination with the DIV.  I may be missing something about how onMouseOver is intended to work across browsers/platforms.

any advice?
<div id='Bar19' class='bar' style='position: relative;background-color:#FFFF00; '>
   <div class='early' style='position: absolute; background-color:#FFFFCC; '></div>
   <span  style='position: absolute;'      onMouseOver=' etc' >Text</span>
</div>
ASKER CERTIFIED SOLUTION
Avatar of vosk
vosk

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Commented:
This problem has been solved!
Unlock 1 Answer and 3 Comments.
See Answers