putting a rollover gif into an iweb template

hi, i am using iWeb for the first time and have created my website using a template but i want to add a gif to the page so when people roll over it, the picture changes. i have made the gif in photoshop and image ready and can only export it as an html file with 2 linked image files which works fine in a browser on its own but i can't find anywhere in iweb to place the html file. i can't 'drag and drop' it as i have been able to with everything else. there might be a really simple solution and if anyone knows it, i would very much appreciate your help!

G5 Mac OS X (10.3.9)

Posted on Nov 28, 2006 11:34 AM

Reply
13 replies

Nov 28, 2006 12:13 PM in response to aussie munky

Are you hosting your site on .Mac or another host?

Either way, at the very least you'll need to upload the HTML files that you have now to your server. If you are hosting with .Mac, then the easiest place to put this is on your iDisk/Sites/ folder. This would be the first step in getting the stuff into your iWeb page. As you can see, it isn't going to be as simple as drag and drop like for regular images. But it won't be that difficult either. You'll be doing a bit of editing of the iWeb generated HTML files.

I assume that you have all the files associated with this image in a folder. Just copy the whole folder into iDisk/Sites/ and you should be able to access the image with a browser using the following URL format:

http://homepage.mac.com/username/foldername/index.html

username = your .Mac account username
foldername = the name of the folder you copied to iDisk/Sites/
index.html = the name of your default start file.

Anyways, once you have gotten the image folder copied to your iDisk/Sites/ folder or your server, post back and let me know the URL that you use to access the image. We can go from there...

Here's an example of something similar on my iWeb pages...

http://web.mac.com/jwtseng/iWeb/kate/MyWorld/F6991CBD-9280-4D0F-8563-5BD9FACE8BC 6.html

Nov 29, 2006 3:18 AM in response to James Tseng

hi there james,
thanks very much for your help.
the link you posted is pretty much exactly what i'm trying to do.
yes i'm on .Mac, have posted it as you said:
http://homepage.mac.com/benhillisdesign/shockrollover/shockingroll.html

and this is where i want to put it:
http://web.mac.com/benhillisdesign/iWeb/%3Abenhillisdesign%3A/PLAY.html

you can see i currently have an animated gif in there, i just want to replace that with my new rollover gif.
thans again for your very quick reply, i look forward to the next step...
cheers,
ben



Are you hosting your site on .Mac or another host?

Either way, at the very least you'll need to upload
the HTML files that you have now to your server. If
you are hosting with .Mac, then the easiest place to
put this is on your iDisk/Sites/ folder. This would
be the first step in getting the stuff into your iWeb
page. As you can see, it isn't going to be as simple
as drag and drop like for regular images. But it
won't be that difficult either. You'll be doing a
bit of editing of the iWeb generated HTML files.

I assume that you have all the files associated with
this image in a folder. Just copy the whole folder
into iDisk/Sites/ and you should be able to access
the image with a browser using the following URL
format:

http://homepage.mac.com/username/foldername/index.html


username = your .Mac account username
foldername = the name of the folder you copied to
iDisk/Sites/
index.html = the name of your default start file.

Anyways, once you have gotten the image folder copied
to your iDisk/Sites/ folder or your server, post back
and let me know the URL that you use to access the
image. We can go from there...

Here's an example of something similar on my iWeb
pages...

http://web.mac.com/jwtseng/iWeb/kate/MyWorld/F6991CBD-
9280-4D0F-8563-5BD9FACE8BC6.html

Nov 29, 2006 6:27 AM in response to aussie munky

Your graphic is great! Looks good! The animated GIF works well, too! You'll have to experiment around with this and see which one you prefer (since the animated GIF is pretty much drag and drop). There are a couple of different ways that you can get your rollover image into your page. I'll go over the easier way...

It's going to take a little bit of editing of the HTML file generated by iWeb for your page. This is the code that you will be adding:

<iframe src="http://homepage.mac.com/benhillisdesign/shockrollover/shockingroll.html" width="700" height="400" scrolling="no" border="0" style="border:none;" frameborder="0"></iframe>

And here is what you need to do in order to find the exact place to put the code...

1. In iWeb, take the existing animated GIF away. In its place add a textbox of the same dimensions (700x400) and drag it into place.
2. Click in the textbox and type in some placeholder text like "ELECTRIFIED". Don't try to format the text or change anything. Just click in the textbox and type.
3. Now publish your page.
4. Go into your iDisk/Web/Sites/iWeb/benhillisdesign/ folder
5. Find the "PLAY.html" file and open it in TextEdit. Make sure to tell TextEdit to "ignore rich text commands" so that you can see the raw HTML code.
6. Search for your "ELECTRIFIED" placeholder text.
7. Replace it with the code above.
8. Select Save under the File menu. Not Save As...just Save.

That should be it. Check your page in Safari. You should see your rollover graphic in place of the textbox. The only issue that I can foresee is the text that you have overlaid on top of the image. I'm not sure how that will turn out. You'll need to experiment with pushing the placeholder textbox all the way to the back layer and then overlaying either textboxes or shapes on top for your text overlay.

Let me know how it goes!

Nov 29, 2006 8:04 AM in response to James Tseng

hi james,
thanks again!
i've done what you said in i web but ummm, i can't find "4. Go into your iDisk/Web/Sites/iWeb/benhillisdesign/ folder"

i don't seem to have a folder anywhere in my idisk that has my website in it? should i have published my site into my iDisk/Sites folder? in iWeb i just published to .Mac and it did it for me.

maybe i'm looking in the wrong place...
cheers,
ben

Nov 30, 2006 3:09 AM in response to James Tseng

hi James,
sorry to be a pain, but i don't have a iDisk/Web/Sites/iWeb/ folder in my iDisk. i had a look everywhere and it doesn't exist? i did a manual sync and nothing changed.

i have noticed in the past, when i open my .mac through the system preferences, i don't get all the buttons they show on the .mac website such as
Account/Sync/iDisk/Advanced. mine just has .Mac and iDisk. i know this because i have tried to use the features such as syncing my bookmarks and address book but i just don't get the options when i click on my .Mac icon (on the .mac website they show you how to do it with screen grabs of the .mac pop-up window, but i don't see what they show)
could this have something to do with it? i have taken a screen grab of what my .mac window looks like but i can't attach it.

argh! i probably just have a setting wrong or something. if you have any ideas i would really appreciate it...
ben



Ben,

iWeb publishes everything into your
iDisk/Web/Sites/iWeb/ folder. NOT the iDisk/Sites/
folder (which is where you put other things, like
your GIF HTML files).

Do you have desktop syncing turned on for your iDisk?
If so, you may need to force a sync in order to see
the newly published files.

Otherwise, you files should be right there.

Nov 30, 2006 7:06 AM in response to James Tseng

thanks guys,

no, i'm not running tiger, i'm on 10.3.9, maybe thats why.

BUT anyway, i found the web folder when i went to my iDisk through .Mac on the web, so for some reason it doesn't show up on my computer, just on the web.

SO, i've put in the new code thankyou very much but there is only one problem now, it 'sticks' on the electrified pic and doesn't change back like it's supoosed to.

http://web.mac.com/benhillisdesign/iWeb/%3Abenhillisdesign%3A/PLAY.html

any ideas?

nearly there, thankyou so much for the help and patience so far...

Nov 30, 2006 10:16 AM in response to aussie munky

Ben!!!!

You did it! Congrats! It looks good. And it functions correctly for me here, too. The rollover effect is fine on my end...no sticking on the electrified frame.

I notice that the graphic is shifted 4 or 5 pixels to the right, though. This sometimes happens. Just go back into iWeb and shift the textbox to the LEFT 4 or 5 pixels to compensate. Then republish.

As you will see, everytime the page is updated, you will need to insert the code into the HTML file again. That's why an application like MassReplaceIt ( http://www.hexmonkeysoftware.com/) can come in handy.

Dec 4, 2006 5:57 AM in response to James Tseng

thanks heaps james!

sorry, i've been away for a few days, i did what you said and moved the box a few pixels to the left and it fixed that little misalignment. thankyou!

the only thing bugging me is that the rollover gif does stick on my machine and a couple of others i have checked on. i'm using safari 1.3.2 (v312.6). it stuck on 2 other machines that had safari but one machine with safari worked ok (?)
it seems to work fine in explorer (except that explorer aligns the whole page to the left of the window). if i can't fix it, i can live with it but if anyone has any ideas how to stop it sticking on the second frame of the gif i would very much appreciate it.

thanks again...

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

putting a rollover gif into an iweb template

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.