Jump to content

question about gradient bgs


Rifts

Recommended Posts

Hey quick question,

 

When making Photoshop mock-ups of website I like to use gradient backgrounds. I a lot of the time the sites height will be unknown or change. an example would be the background of this post the blue to white.

 

What is the best way to do this? Do I save a sliver of the gradient and repeat it x or what?

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/216793-question-about-gradient-bgs/
Share on other sites

Lets say you are doing a vertical gradient (where the color changes from top to bottom). Create a gradient of a set height. Say 900px. Take a 5px wide slice of that gradient. So now your image is 900px by 5px. Repeat along the X axis.

Then, get the color at the very bottom pixel of the gradient. You will set the background color of the element (generally the body, though not always) to that color. So the image will change in color as it goes down, and at the point where the image ends, the background color is the same as the bottom of the image, providing a seamless transition.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.