# Repeat image horizontally (css)



## alexondrums

Hi,

I would like to create a page with an image that repeats horizontally only, and place text above and below the image. 

I'm trying CSS using background-repeat: repeat-y, however this causes the image to fill the screen – I assume it gets to the end of the screen and continues filling horizontally on a new line?

The effect i want is:

SPACESPACE
SPACESPACE
TEXTEXTTEXT
<--IMAGE-->
Text Text Text


Many thanks


----------



## wmorri

Hi,

I would try something like this:


HTML:


div.img
**
  margin: 2px;
  border: 1px solid #0000ff;
  height: auto;
  width: auto;
  float: left;
  text-align: center;
}	
div.img img
**
  display: inline;
  margin: 3px;
  border: 1px solid #ffffff;
}

** are supposed to be left bracket but it isn't working for me right now.

Cheers!


----------

