Jump to content


Photo

Mouse Rollover on image


  • Please log in to reply
5 replies to this topic

#1 thecomputerlab

thecomputerlab

    Advanced Member

  • Members
  • PipPipPip
  • 30 posts
  • Framework Version:1.6.0
  • Country: Country Flag

Posted 18 October 2011 - 01:29 PM

Hi guys need help again, I am trying to add several images to in the Primary Sidebar that change on rollover i can create and get a link to work by putting this short code into a text widget but i need it to change to a different image when i hover over it. I have looked for a widget and also code (found several sites with work around but non sound convincing. (And i am also not brilliant in code) Am i doing right by adding into Primary Sidebar via Text widget or is there a easier way. Any Help always appreciated.

#2 Kate

Kate

    Advocate

  • Members
  • 3039 posts

Posted 18 October 2011 - 01:46 PM

What I would do is assign the image as a background, and then use the a:hover state to change the background ;) You would also have to use "display:block" on the anchor tag, and assign it a height/width equal to that of the image(s).

#3 thecomputerlab

thecomputerlab

    Advanced Member

  • Members
  • PipPipPip
  • 30 posts
  • Framework Version:1.6.0
  • Country: Country Flag

Posted 18 October 2011 - 03:01 PM

Kate. Thanks for the prompt response, i do have the 2 images eg the primary and then the image to change to once hovered over but unsure on the code and how it should be laid out. Also would you place in the side bar text widget. Thanks Grant

#4 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 18 October 2011 - 06:03 PM

Placing this in a sidebar widget would only be done with a text widget. I'm not sure how, other than Kate's suggestion, you'd actually achieve this. Have you looked for plugins or at some of the CSS training sites?

#5 tradewindowspreston

tradewindowspreston

    Member

  • Members
  • 12 posts
  • Country: Country Flag

Posted 13 June 2013 - 08:55 AM

If anyone is still following this subject, i am also trying to get the effect of a image changing when rolled over purely in a button format so the user knows its clickable eg change from normal to a darker version of the same image (i have done this before in dreamweaver, but the effect is automated).

I have had a route around the forum and the internet in general i cant seem to get anything to work.



#6 greenfly

greenfly

    Advocate

  • Members

  • 3268 posts
  • LocationManchester, England
  • Framework Version:latest
  • Country: Country Flag

Posted 13 June 2013 - 06:51 PM

Tradewindowperson - please create you own topic and someone will help you out. thanks