CSS image rollovers or Javascript image rollovers???? (Full Version)

All Forums >> [Web Development] >> Cascading Style Sheets



Message


Sigrid -> CSS image rollovers or Javascript image rollovers???? (7/24/2004 13:01:41)

I'm updating my site, which presently uses a customized FrontPage theme (mainly for the ease of employing the image navigation buttons) built with FrontPage 2000.

In updating my site, I want to tackle external CSS. I also want to keep my rollover image buttons and put them in an include page ( to make management of them easier since I am forgoing the easy-to-use theme navigation).

All of this means I need to make a choice. Tackle CSS image rollovers or tackle the Javascript rollovers. I have seen references to CSS image rollovers here, but in searching the web I don't find a true CSS image rollover. (Aim I looking in the wrong places?) The closest I've found is a transparent gif rollover. Furthermore, during my travels I've found the following comment:

quote:

"CSS is used to style the content of the page. It can hide/unhide or mask/unmask content but it cannot create, delete, or replace it. You cannot use pure CSS to replace your _inactive.jpg images with another one, though you can use Javascript."


Is this true?

If false, what are the pros and cons of CSS image rollovers vs. javascript image rollovers (especially as it pertains to browser compatibility). In the past I've had to "dumb-down" sites to make it more accessible (my clients are in biotech -- you would have thought they were more up-to-date -- but maybe the CFOs are just tight!).

Word of Warning: I'm self taught so my understanding/background resembles Swiss cheese -- there are lots of holes!!

Thanks in advance for your help.

Sigrid




c1sissy -> RE: CSS image rollovers or Javascript image rollovers???? (7/24/2004 20:00:54)

Hi Sigrid!
Welcome to outfront.
I just wanted to let you know that someone will be along to help you out.Most of the time its a bit slow here on the weekends.

I'm sorry that I can't help you with this one, but I dont know anything about this part of css.

Be patient, someone will be along to help you though.




Giomanach -> RE: CSS image rollovers or Javascript image rollovers???? (7/29/2004 7:40:47)

Sigrid

First fo all check out this thread:

http://www.frontpagewebmaster.com/m_199169/tm.htm

Karen ever so gracefully provided a link to get a CSS rollover menu. Far easier to use than JavaScript ones.

This, however:

quote:

"CSS is used to style the content of the page. It can hide/unhide or mask/unmask content but it cannot create, delete, or replace it. You cannot use pure CSS to replace your _inactive.jpg images with another one, though you can use Javascript."


Is only partially true. Yes CSS is for styling etc, but, JavaScript CANNOT delete content. It can only hide it, as can CSS if you use the right psuedo (sp?) classes. Only Server side etchs have the ability to delete content from pages etc.

quote:

If false, what are the pros and cons of CSS image rollovers vs. javascript


CSS rollovers will work anywhere, JavaScript rollovers will only work with Browsers that have JavaScript enabled.

Dan




Nancy -> RE: CSS image rollovers or Javascript image rollovers???? (7/29/2004 13:44:24)

quote:

ORIGINAL: Giomanach

CSS rollovers will work anywhere ...


Actually that is not true -- this would also depend on the browser used and the level of support for CSS that it provides.

Unfortunately, the scientific world seems to be on the slow side for updating their browsers. The culprit, for the CSS rollovers not working, would most likely be NN4+ as its support for background images, which is what CSS rollovers utilize, is sadly lacking. Most generation 5+ browsers should be okay with it.

You would want to have a look at your stats if you can and see what browsers your visitors are using.

Nancy




Sigrid -> RE: CSS image rollovers or Javascript image rollovers???? (7/30/2004 11:06:30)

Thanks for your contributions regarding rollovers. As suggested by Nancy, I checked our stats for the last 18 months and I have a significant number of users with IE & NN 4 browsers. So I guess I'll tackle the JavaScript rollovers (with text links at the bottom of the pages as backup).

Thanks again for your help!

Sigrid




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.140625