2011-09-14, 04:15 PM
Hi All,
how can implement gradient support for most browsers ?
Chrome displays
firefox displays
I have not set the variable 'top' to anything so I guess it will be take a default 'null' or '0'
so the question is :-
is there a way of testing the user agent (browser) and using the correct css code ? currently I have been developing using values in global.css (adjusting the values to the browser I am testing with) but I guess to adjust these values 'on the fly' will require code in templates. With my legacy programming knowledge the ideal thing to use would be a case statement but I have not found a php/html equivalent nor a way to test the users browser ... can anyone help ?
N.B I don't use windows so I have no real way of testing how IE displays the code but users have given feed back that gradient is not displayed correctly
how can implement gradient support for most browsers ?
Chrome displays
-webkit-gradient(linear, 0% 0%, 0% 100%, from(#203446), to(#BBBBBB))
correctly but firefox and ie do not firefox displays
-moz-linear-gradient(top, #203446, #BBBBBB)
correctly but Chrome & ie do not I have not set the variable 'top' to anything so I guess it will be take a default 'null' or '0'
so the question is :-
is there a way of testing the user agent (browser) and using the correct css code ? currently I have been developing using values in global.css (adjusting the values to the browser I am testing with) but I guess to adjust these values 'on the fly' will require code in templates. With my legacy programming knowledge the ideal thing to use would be a case statement but I have not found a php/html equivalent nor a way to test the users browser ... can anyone help ?
N.B I don't use windows so I have no real way of testing how IE displays the code but users have given feed back that gradient is not displayed correctly