PDA

View Full Version : [RESOLVED] Adding sound to a Link using CSS


Jake302
10-08-2007, 07:49 PM
Hey, I'm about 50% done creating my website. And I was thinking of adding sounds to my links (on mouseover).

Well I decided that I definitely want to. I've picked out the sound. The only problem is, I only know how to add sound to a link like that using javascript. And with 50% of all of my pages created. I don't want to go back through all of those pages to add javascript into the header and change the coding and all of that stuff.

So is there anyway I can add my sound using CSS (all of my pages are linked to a CSS file). This way I won't have to edit ALL of my pages, instead, just my CSS sheet.

Thanks in advanced.

- Jake

Pegasus
10-08-2007, 08:16 PM
Sorry, but as far as I've been able to find, you can't use CSS to add sound to a link. You'll have to do it the hard way, I'm afraid.

Peg

Jake302
10-08-2007, 09:36 PM
:(

Is there anyway I can tie a javascript file into the CSS.

Have the sound code on a javascript file and have it 'on mouseover activate linksound.js' or something of that nature.

I REALLY don't want edit all of those pages.

Pegasus
10-08-2007, 09:49 PM
Nope. No way to tie the JS into CSS that I know of at all. Mind you, I'm not an expert at JS, either. What I'll do is move this thread over to clientside scripting. Someone there will know more about it, I'm sure.

Peg

BillyGalbreath
10-08-2007, 10:12 PM
CSS deals with visual style of the page - by no means can it be integrated with sound or javascript. If you want, it might be easier to edit your javascript file to match your existing HTML pages. But there is absolutely no way to integrate JS in CSS and you cannot add sound with CSS. Sorry.

Jake302
10-09-2007, 07:38 AM
Alright, looks like I gotta do it the hard way.

Thanks a lot for your help.