PDA

View Full Version : Gradient In table cell


dwoody
08-20-04, 11:09 PM
I was wondering if there was a way in CSS to create a gradient. By this I mean a solid colour that is darker on the left and as it move to the right it fades until it is another color (usually white).
1) Is this possible
2) If so how is it done

I've attached an image to show you want I mean.
Thanx a bunch

nivek
08-20-04, 11:57 PM
Heres the script:


style="filter:progid:DXImageTransform.Microsoft.Gradient( endColorstr='#ffffff', startColorstr='#4020ff', gradientType='1');" style="filter:progid:DXImageTransform.Microsoft.Gradient( endColorstr='#C0CFE2', startColorstr='#4020ff', gradientType='3');"

Put that script in the <td> section like this...

<td valign="top" bgcolor="a0c0c0" bordercolor="000000" width="" border="2" style="filter:progid:DXImageTransform.Microsoft.Gradient( endColorstr='#ffffff', startColorstr='#4020ff', gradientType='1');" style="filter:progid:DXImageTransform.Microsoft.Gradient( endColorstr='#C0CFE2', startColorstr='#4020ff', gradientType='3');" >

Well hope this helps you. an example is on my site :D
linkfarm.tk (http://linkfarm.i8.com)

please visit!

heres a helpful thing on the script...

at the end, gradientType='3');" , you can change the number 3 to 0 - 4 :)

you can also change the colors at startColorstr='#' and endColorstr='#'

C-ya!

nivek
08-21-04, 12:14 AM
Well the smileys kind of Killed it..

Here It is (just made!) :

click here for the Code, on my site! (http://linkfarm.i8.com/Scripts/Gradiant.html)

akaz
08-21-04, 01:30 AM
Except that's proprietary Microsoft stuff. It won't work on Macs or even >>other<< browsers on Windows for that matter. Please don't use things like that expecting people to be using Internet Explorer. Lots of people hate that browser, anyhow. ;)

Eclipse
08-21-04, 10:21 PM
Well that's css for you that's why for important stuff never use css, since most browsers interperite it differently even ie 5 and 6 are very different.

nivek
08-21-04, 10:29 PM
that true, only people that would have internet explorer can view the gradiant effect. Sorry if you dident know that before, well that the only thing i know for what your looking for.

`Linkfarm.tk

snaip
08-22-04, 05:38 AM
Well the smileys kind of Killed it..

Here It is (just made!) :

click here for the Code, on my site! (http://linkfarm.i8.com/Scripts/Gradiant.html)

You should use the [ code ] (remove spaces) tags when posting code! :)

dwoody
08-22-04, 06:48 PM
thanks for your help guys, that code works fine for me because i use internet explorer and my website is only for personal use. thanks again

Eclipse
08-22-04, 10:08 PM
An alternive would just say on the first page that people see that your page is bestes viewed in IE vs. X
[x = version you have on your computer]

nivek
08-25-04, 09:14 PM
np :D

`linkfarm.tk