There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
acer black screen blue screen boot bsod computer connection crash css dell display driver drivers email error excel explorer firefox firefox 3 game hard drive internet internet explorer itunes laptop linux malware network networking outlook outlook 2003 outlook express partition password printer problem ram router security slow software sound trojan usb video virus vista windows windows xp wireless
Web Design & Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Internet & Networking > Web Design & Development >
Dreamweaver rollover images


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
kev269's Avatar
Member with 69 posts.
 
Join Date: Nov 2004
Experience: Advanced
03-Dec-2005, 10:24 AM #1
Dreamweaver rollover images
Hi,

I'm trying to insert a rollover image into Dreamweaver. The original image is fine, but the rollover image becomes slightly smaller when I have the mouse cursor over it. Both the original and the rollover image are exactly the same size. Is there a way to change this so that the rollover image doesn't become smaller?

Thanks for your help.
deepdiver01's Avatar
Senior Member with 729 posts.
 
Join Date: Dec 2004
Location: Cairns, Australia
Experience: Intermediate
03-Dec-2005, 10:37 AM #2
Hi kev,

I am assuming that you are using the rollover function in dreamweaver to create a rollover with javascript (insert>image objects>rollover image), and you have 2 images you are working with.

As long as your 2 images are exactly the same dimensions, and there is sufficent room to accomodate the images within the cell you are putting them in, this should not be occuring.

What changes have you made to the image for the mouseover?

Perhaps give us a sample of the code you are using and maybe a screen shot of the image dimensions, and we may be able to sort this out.

Deep.
__________________
Six mumfs ago I coodnt spel injineer. Now I are wun.

Domain Names, Web Hosting
Free Online Games | Free Flash Games
Australian Domain Names
Motor Finance Wizard Information Base
kev269's Avatar
Member with 69 posts.
 
Join Date: Nov 2004
Experience: Advanced
03-Dec-2005, 11:03 AM #3
i uploaded it here http://www.aoxk61.dsl.pipex.com/index.html

it might take upto a minute for the rollover image to load.

the only change i made to it was the background colour. ive just realized that only in Internet Explorer does the rollover button get small and the text gets smaller too. But in Firefox, the rollover button just moves down slightly.

thanks.

Last edited by kev269 : 03-Dec-2005 11:23 AM.
ptvGuy's Avatar
Member with 78 posts.
 
Join Date: Apr 2004
Location: Far Northern California
Experience: Advanced
03-Dec-2005, 06:55 PM #4
I'm not seeing a size change at all. I'm seeing a one-pixel drop in both IE6 and Firefox 1.0.7.
deepdiver01's Avatar
Senior Member with 729 posts.
 
Join Date: Dec 2004
Location: Cairns, Australia
Experience: Intermediate
03-Dec-2005, 07:41 PM #5
Sorry about taking so in getting back to you.

As ptvGuy said, all I can see is the 1 pixel drop as well.

How about getting rid of the Javascript rollover and trying CSS instead. You will find that it will be a lot more stable, is a lot less coding (cleaner pages), most of the coding can be placed on an external stylesheet, and it will load a lot quicker.

Here is something I just bashed up for you to give you an idea. Try this out.

The images I knocked up are attached.

In a stylesheet.css file, place the following code:

p.navbuttons a {
background-color: #ffffff;
background-image: url(home-off.gif)

/* Don't forget 'images/home-off.gif' if images in separate folder*/
display: block;
padding: 0px 0px 0px 0px;
width: 100px;
height: 50px;
border-top: 0px;
border-right: 0px;
border-bottom: 0px;
border-left: 0px;
background-repeat: no-repeat;
}
p.navbuttons a:hover, p.navbuttons a:active {
background-color: #333333;
background-image: url(home-on.gif);
background-repeat: no-repeat;
}


Now, on your index.html page put this code in the head of the document:

<link href="stylesheet.css" rel="stylesheet" type="text/css">
/*Remember path to your stylesheet may change depending upon where you place the file */

Finally, in the cell that you want your button to be placed, insert this code:

<p class="navbuttons"><a href="pagetobelinked.htm">&nbsp;</a></p>

I have just tried it on my localhost and it works a treat.

Again, you will find it easy to insert this code on all your pages (not sure how your page is laid out) and it is a damn sight easier to modify at a later date (just change the stylesheet) and a lot cleaner.

Hope this helps.

Deep.
Attached Images
(attached image) (attached image) 
__________________
Six mumfs ago I coodnt spel injineer. Now I are wun.

Domain Names, Web Hosting
Free Online Games | Free Flash Games
Australian Domain Names
Motor Finance Wizard Information Base
kev269's Avatar
Member with 69 posts.
 
Join Date: Nov 2004
Experience: Advanced
04-Dec-2005, 08:30 AM #6
i dont know if i am doing anything wrong, but once I have inserted all the code, a small underscore line apears in Dreamweaver. When I test it in Internet Explorer, the line appears and when I put the mouse cursor over it, a slightly larger part turns orange.

ive done the stylesheet.css file too

<head>
<link href="stylesheet.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<p class="navbuttons"><a href="pagetobelinked.htm" class="style1">&nbsp;</a></p>
</body>
</html>
deepdiver01's Avatar
Senior Member with 729 posts.
 
Join Date: Dec 2004
Location: Cairns, Australia
Experience: Intermediate
04-Dec-2005, 09:18 PM #7
Hi Kev,

The line you are seeing is the "&nbsp" that I accidently left in there. Just delete that and the line should disappear.

Try that. Sorry about that.

Deep.
Sequal7's Avatar
Computer Specs
Distinguished Member with 2,369 posts.
 
Join Date: Apr 2001
Location: Around the corner!
Experience: Including today?
04-Dec-2005, 11:12 PM #8
Hello

The error isnt dreamweaver, it's your images they are not equal.

http://www.aoxk61.dsl.pipex.com/SITE/home_top.gif = 140 x 50
http://www.aoxk61.dsl.pipex.com/SITE/home_bottom.gif = 140 x 51

Change the second image, they will work fine.
kev269's Avatar
Member with 69 posts.
 
Join Date: Nov 2004
Experience: Advanced
05-Dec-2005, 04:27 AM #9
hmm thanks everyone, i dont know how the second image became 51! lol
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who help people like you solve computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 12:19 AM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.