BGcolor fader javascript script in table cell?

  powertool 21:25 27 Oct 03
Locked

I have been looking for a script that will run a background color fader in just one cell of a table. I think this is technically possible but I don't have the skill to create such a script!

One idea I thought of is to just have a BGcolor fader in an .html page and then use an IFRAME to pull it into the table, but that is very clumsy even if I could make it work!!

[PS have looked in Dynamic Drive and Javascript etc]

Thanks in advance for any help you can give.

  Taran 08:52 28 Oct 03

Do you want a colour fade from one dark to light colour as a static background (say black at the top down to white at the bottom) or do you want the colours to continually fade from one to another and then yet another ?

For a static table/cell background fade, try pasting this code into your page:

<table style="filter:progid:DXImageTransform.Microsoft.Gradient(endColorstr='#ffffff', startColorstr='#ccffcc', gradientType='0');"><tr><td>Table content text goes here<br><br>and maybe some more can go in here<br><br>........</td></tr></table>

Alter the colours and text to reflect your preferences.

If you want continually changing colours, post again and I'll get back to you later today.

Regards

Taran

  powertool 20:58 28 Oct 03

I meant a continually changing background - say from black through greys to white... in a loop but I have just tried the script you supplied and that is rather good too!!

Also - what language / code is that written in? Where can I learn more about it?

Many thanks

  powertool 21:04 28 Oct 03

whole new world!!

  Taran 11:39 29 Oct 03

The above is plain vanilla HTML that takes advantage of a Microsoft method of coding a gradient background fade.

It's static as you have seen, but it fades from any start colour your specify to any finish colour and if you change gradientType='0') to read gradientType='1') it alters the direction of the colour fade (left to right or top to bottom).

Using JavaScript is another laternative but you rely on your site visitors having a Java enabled browser and while most are these days, some of them cope with JavaScript far better than others.

I recently experimented with a few browsers only to find that some of the could not cope at all with some JavaScript menus. This rendered the entire site navigation structure useless but it is not through poor coding, rather there are certain limitations that some browser software has and until that issue is sorted out JavaScript will always be slightly dodgy ground.

T

  powertool 21:04 29 Oct 03

thanks for your help Taran - I guess the key is to provide a plain old alternative menu in HTML so that the site is still useable.

This thread is now locked and can not be replied to.

Best phone camera 2016/2017: Galaxy S7 vs iPhone 7 vs Google Pixel vs HTC 10 Evo vs OnePlus 3T vs…

1995-2015: How technology has changed the world in 20 years

Best Christmas Agency Projects of 2016

Super Mario Run preview | Hands-on first impressions of Super Mario Run: Mario's iPhone & iPad…