Image only needs to be 1px wide X however tall the fade is. Set the background color to whatever color is at the very bottom of the fade. Define the body in the CSS like this:
body {background:#YourBottomHexValue url('YourGradientImage.jpg') repeat-x top left;}
jquery gradient plugin
Image only needs to be 1px wide X however tall the fade is. Set the background color to whatever color is at the very bottom of the fade. Define the body in the CSS like this:
body {background:#YourBottomHexValue url('YourGradientImage.jpg') repeat-x top left;}
Erm, smoothest way to do the bg in that manner is to keep it at 1px width, that way the next column over is exactly like the column before it. Doing it at 10px or wider especially as a jpeg risks something as simple as artifacting causing a not-so-smooth effect going across.Background image should be at least 10px wide. It's bad practice to optimize background image, so it's best when you save it in highest quality available. That way you will achieve smooth transition.
http://www.fiksie.com/backgroundtest/
Page is made out of two containers. left part has 10px wide background and right part has 1px wide background. See for yourself which one looks better. Artifacts are more likely to show on narrower backgrounds.
Size for 10px x 1000px background is 9.4 kB
Size for 1px x 1000px background is 9.1 kB
Both backgrounds are saved at the same quality settings
If your site has 10.000 visitors monthly, that's 3 MB difference.
HAHAHA at first i thought you stuffed that image because the arrow pointed to your sig. that would have been epic
LOL as much as I enjoy a good shit sir, even I wouldn't go there.
Until now. I would always save my images as "save as...", not "save for web...". That explains the huge difference in file size (holy shit, thanks for this one).
http://www.fiksie.com/backgroundtest1/
Check this one out. I saved it like you mentioned.
10px x 1000px background is perfect, there is no artifacts at all and weights only 1.82 kB
1px x 1000px background is almost perfect, but it still had some abrupt changes, but I guess it can be only seen by those who have 20/20 vision. It weights 1.15kB.
I still stand behind the "wider is better" theory.
Also, I would avoid png files for background gradient since ie and firefox render them slightly different.
yeah, okYou just lost all credibility with the "save for web" thing, lol
I really don't understand why in a gradient, width would make any difference whatsoever beyond adding to the file size. When you repeat-x, the pixel(s) on the left = the pixel on the right in the same row. Whether that's 10 pixels or 1, it's going to be the exact same thing. If I'm wrong, someone please tell me why.