View Full Version : How to stretch and repeat an image for background

11-03-2011, 11:56 PM
I need to create a background image for my top navigation for website so instead of creating a long stretched image which will be big I need to create a small image/strip that will be repeated across the width so that it will be a very tiny image and will not slow my website.

So lets say my navigation is (Width X Height) 900px X 10px I will make a small strip of 10px X 10px and then repeat it across the width.

Sorry its a dumb question but I am new to CSS.

11-04-2011, 12:03 AM
background: url('image.png') repeat;

or separately:

background-image: url('images.png');
background-repeat: repeat-x;
background-repeat: repeat-y;
background-repeat: repeat; (both x&y)

11-04-2011, 12:05 AM
Thanks for the help.