PDA

View Full Version : image repeat...


Winterworks
12-30-2008, 01:06 PM
http://img184.imageshack.us/img184/2069/83109364cz9.jpg

I've been starting to code styles... But I need some assistance.

That banner in the image, I have a image to match it (1px by 150px) and I want it to be repeated from the banner, until the end of the navbar. But if someones screen is smaller, then some repeating images are removed, and the banner stays the same. Also, if the screen is bigger, more repeated images are added on, and the banner stays the same.

Can someone tell me how to do this?

Lynne
12-30-2008, 02:37 PM
If you have an image just 1px wide and repeat it, it should be fine no matter what a persons browser width is.

pein87
12-30-2008, 04:08 PM
in the css use this inorder to make it repeat.
(may need to make it a custom id or class)
#bgimage {
background-repeat: repeat;
}
that sets the image to repeat vertically and horizontally as well

if you only wont it to repeat horizontally use this.

#bgimage {
background-repeat: repeat-x;
}

by default all backgrounds repeat unless told not to with css.

--------------- Added 1230660604 at 1230660604 ---------------

also make the image in a div it will have a set width of 100 by defaukt with fulidness so it would be like this.
<div id="bgimage"><img src="path/to/image.jpg></div>

Winterworks
12-30-2008, 07:37 PM
If you have an image just 1px wide and repeat it, it should be fine no matter what a persons browser width is.

Yes Lynne, but HOW do I make it repeat?

pein87
12-30-2008, 07:50 PM
use css to make it repeat by default it repeats.

I gave you the code above to use for your image if you need more help send me your skin and i`ll do it for you.

Lynne
12-30-2008, 09:58 PM
Here's a page on the css background property - http://www.w3schools.com/css/css_background.asp If you need more help, then you'll have to post that part of your template.