...

View Full Version : Strange Background Repeat.



muneeba9071
04-05-2011, 01:28 PM
Hi,

I have a div box which has different colors to its sides, it has red color to the left and black to the right.

Take a look at this image:
http://www.mzeb.com/repeat.png

What I want is, I want a repeat background image which will repeat red line to the left, and grey to the right.

I've tried a background like:
______________________

and used :


background: url(images/bg.png) repeat;


But it doesn't work!

Thanks in advance for the help

Kor
04-05-2011, 03:14 PM
I don't understand. Which exactly is the background, where and on which direction should be repeated?

muneeba9071
04-05-2011, 03:15 PM
both direction should be repeated

Kor
04-05-2011, 03:20 PM
on which axis? X I presume. But where is that image? Where should it be repeated? It could be of some help if you would detail a little but your aim.

About repeated backgrounds:
http://www.codertools.com/css_help_guide/css_background-repeat.aspx

teedoff
04-05-2011, 03:36 PM
I dont think that image you showed us is a repeating image. I say this because it has more than one color with definate beginnings and endings.

Think about it. If you have a black line and tell it to repeat on the X axis, then it will repeat that SAME black line as far left and right as the container is in will allow it.

But a background image with 4 distinct colors all ending at a specified place on the page is not a repeating image.

muneeba9071
04-05-2011, 03:49 PM
Forget about the image, I just needed an idea, on how to repeat a background which is different colors to its sides. I just need the code

Kor
04-05-2011, 04:01 PM
background: url(images/bg.png) repeat-x;

teedoff
04-05-2011, 04:01 PM
I just gave you the idea. Create the image with the different colors you need and make it the height and width you need.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum