The situation:
A table with width set to 100%, that has a cell inside with 1000px width. The table is centered, and so is the cell.
I would like to have a gradient from left to right, and right to left that would end at the beginning of the centered cell, with the same color as the cell.
The problem is, to occupy the whole page, no matter what size the browser is, the table is set to 100%, the cell is set to 1000px so it’ll never change its size,
How can i achieve, if possible, what i want, making sure that in smaller resolutions/monitors or with window re sizing, the gradient will stop at the beginning of that cell, since gradients are set with percentage?
Is something like this what you want?
styled such that
You can try this example here: http://jsfiddle.net/qvum4/1/
UPDATE
However, if you don’t have a specific reason to use tables, and you only want to achieve this effect, you shouldn’t use tables.
There are a few jQuery gradient plugins around, that you can try to use.
Of you could develop a custom jQuery solution, in order to keep all the styling gibberish outside of the markup.
Try this example here: http://jsfiddle.net/YnUpY/1/