Is there away to set the background of a table to 50% of its height, so that half is white and the other half is transparent.
Thanks in advance Chris
Printable View
Is there away to set the background of a table to 50% of its height, so that half is white and the other half is transparent.
Thanks in advance Chris
Yes and no. There are options that may or may not work for you:
- find the number of table rows, divide by 2 and give white background to the desired half of them.
- you can use a white background image. Make it as high as you want the white to go, then repeat-x to go across the length of the table. This requires you to know the intended pixel height of the table.
- same idea as above, but specifically use a PNG if you want a smooth gradient transition between white and transparent. Some old versions of IE don't support transparent PNGs.
- CSS3 can make background gradients. If you want to go this route, be prepared to use multiple vendor-specific declarations, and be mindful that it might not work in all browsers.