thunder rider
New Member
Any advice would be much appreciated, I'm sure this is simple for some of you web wizards. Thank you very much for your time.I have some css that is working to change the revealed portion of .png when a user hovers over it:\[code\].small_icons ul li.companyButton .circle {background-position:0 0;}.small_icons ul li.companyButton:hover .circle {background-position:0 -56px;}\[/code\]I'd like to then keep the position at 0 -56px when the user clicks on the image and switch back to 0 0 when the user clicks on a different image. This is all happening on the same page so I imagine I have to use a javascript onclick function.I can't seem to figure out how to access that specific css element using javascript. I've tried:\[code\]document.getElementByClass("circle").style.background-position:0 -56px;\[/code\]but that doesn't change anything. Is it because .circle is a child class of .companyButton which is a child class of .small_icons? Many thanks!