N/APosted on - 12/10/2013
I am searching for a script for HTML table fading background, I am unable to find it on the Internet, Can anyone help me so that I can use this cool effect on my page, Please do the needful, or provide me any tips on this.
Rebekah J Anderson
Script for HTML table fading background
This is a classic problem of HTML programming. I am assuming you have some knowledge of HTML.
So there are 2 ways of applying a gradient to any element in a HTML page. Both these techniques involve CSS but one of which is CSS3.
To use a basic CSS method do the following:
Download some gradient images to be used as the background ( for example, this is a good set of gradients: http://www.deviantart.com/art/Gradients-67410531)
You need to apply a style to your table. Do this by inserting the <style> tag in the <head> section of your HTML file, and the style should look like this:
Now when you create a table using the <table> tag it will come pre-defined with the image you have selected in the CSS style for it
CSS3 gives you more power over the kinds of gradients you can apply to elements in your page. Also, they are not images, they are rather generated when the HTML code is parsed by the browser. So the 2nd method is as follow:
Just like above, insert the following code into the <head> section of your HTML file:
background: linear-gradient(red, blue);
Now, when you create the table normally in HTML, it will show up with a red and blue gradient
You can modify it further by using different colors, or changing the direction of the gradient or even deciding between linear-gradient or radial-gradient
I would strongly advise you to use CSS3 because it is supported by most browsers today including the latest versions of Firefox, Chrome and Internet Explorer.