I have an image and its a png but its not a gradient and I want to still use it as a background image. I tried using repeat-x but it just makes the image little boxes across the page. How could I go about doing this?

  • Will be good to show us how the image looks like. The way you described, doesn't seem like it is suitable for use as a background without some editing work. o.k.w over 9 years ago
  • I agree with o.k.w., it sounds like you might need to crop the sides of your image to make it not show little boxes. Mottie over 9 years ago

1 answer

Jordan 469

You need to create a square image of the gradient, in photoshop or other image editor program - save it to your host site or if your working locally save it to your computer. Once you do, you will have to insert the following CSS code:

         background-image:url('image location');

For additional information regarding backgrounds you can visit CSS Backgrounds

Answered over 9 years ago by Jordan