Jump to content

MouseOver in Webpage


firefly2442
 Share

Recommended Posts

So I'm trying to create a webpage where the links are images and when you mouse over them, they change. It's pretty simple and I've found a billion sites through google explaining it. In Firefox it looks great. In IE7, it runs a tab at the top saying that it restricted the webpage from running scripts. That's really annoying. I'm using Javascript right now, are there any other ways to do it? Flash isn't an option for this website. Thanks. :)

Link to comment
Share on other sites

There is a simple way of doing it with CSS, just by having a background image with both button states on it (hover and "normal"). The CSS then tells it on the hover state to shift to the right X pixels to show the bottom half of the background image. This means there is no flicker for the hover state, as once the background image has loaded you've got both graphics.

http://wellstyled.com/css-nopreload-rollovers.html

Link to comment
Share on other sites

In Firefox it looks great. In IE7, it runs a tab at the top saying that it restricted the webpage from running scripts.

What about the news tabs on our news page here - do you get the scripts warning in IE when do a mouseover on them? I don't...are the security settings in your IE at default?

Link to comment
Share on other sites

In Firefox it looks great. In IE7, it runs a tab at the top saying that it restricted the webpage from running scripts.

What about the news tabs on our news page here - do you get the scripts warning in IE when do a mouseover on them? I don't...are the security settings in your IE at default?

Hmm... no error there. That's strange, did you do yours in a different way? IE7 is giving me an error on GR.net mainpage, "Line 720, Char 2, Error: Object Expected". The mouseover images in the menu still work though.

Thanks for the CSS tip magnumkp, I'll try it out and see if it works.

Link to comment
Share on other sites

Hmm... no error there. That's strange, did you do yours in a different way? IE7 is giving me an error on GR.net mainpage, "Line 720, Char 2, Error: Object Expected". The mouseover images in the menu still work though.

Yeh I just noticed that too, it's unrelated but I know what it is, I'll fix it eventually.

The tab rollovers were made using dreameaver.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...