The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> image from color to b/w with rollover, extra new at this and using frontpage at work
ConcreteBoy
post Nov 9 2006, 11:11 AM
Post #1





Group: Members
Posts: 4
Joined: 9-November 06
Member No.: 780



i work for a small electrical firm and i've been elected to design the website because of my graphic design abilities but i am completely new to html and such. my boss wants a lot done to the site but this seems like it would be the easiest thing to tackle right off. all he wants is the main image on the site to change from b/w to color when it is rolled over. how do i do that? blink.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Nov 9 2006, 11:35 AM
Post #2


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 18,133
Joined: 9-August 06
Member No.: 6



Hi! smile.gif

That can be done either with JavaScript or CSS, depending on some things that we need to know. Is the image a background image or an inline image? If the latter, is it linked? The best would be if you could post the URL to a sample page so we can see for ourselves.
User is online!PM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
JamieHarrop
post Nov 9 2006, 11:37 AM
Post #3


Advanced Member
****

Group: WDG Moderators
Posts: 129
Joined: 25-October 06
From: West Yorkshire, UK
Member No.: 570



Just to clarify Pandy's post. You will need to create two seperate images. One in colour, the other in black and white. You would then use Javascript or CSS to change back and fourth between these two images.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
ConcreteBoy
post Nov 9 2006, 12:22 PM
Post #4





Group: Members
Posts: 4
Joined: 9-November 06
Member No.: 780



QUOTE(pandy @ Nov 9 2006, 12:35 PM) *

Hi! smile.gif

That can be done either with JavaScript or CSS, depending on some things that we need to know. Is the image a background image or an inline image? If the latter, is it linked? The best would be if you could post the URL to a sample page so we can see for ourselves.


its inline and not linked, its purely for aesthetic purposes. i don't have a way to show you since the site has yet to be published.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Nov 9 2006, 05:41 PM
Post #5


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 18,133
Joined: 9-August 06
Member No.: 6



Then you are stuck with JS, because IE doesn't support CSS :hover on other than links.

CODE
<img src="colorpic.jpg" width="" height="" alt="Bla bla"
onmouseover="this.src='bwpic.jpg'" onmouseout="this.src='colorpic.jpg'">

Take care with the quotes. Substitute colorpic.jpg for the name of the picture you have now and bwpic.jpg for black and white version you are going to create.

You'll find more fancy ways to do it if you follow the Google link above, but that isn't needed really for a single image.
User is online!PM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
ConcreteBoy
post Nov 13 2006, 11:40 AM
Post #6





Group: Members
Posts: 4
Joined: 9-November 06
Member No.: 780



QUOTE(pandy @ Nov 9 2006, 06:41 PM) *

Then you are stuck with JS, because IE doesn't support CSS :hover on other than links.

CODE
<img src="colorpic.jpg" width="" height="" alt="Bla bla"
onmouseover="this.src='bwpic.jpg'" onmouseout="this.src='colorpic.jpg'">

Take care with the quotes. Substitute colorpic.jpg for the name of the picture you have now and bwpic.jpg for black and white version you are going to create.

You'll find more fancy ways to do it if you follow the Google link above, but that isn't needed really for a single image.


thank you so much!!
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 18th February 2019 - 01:05 PM