css positioning

Jan

New Member
Hello!

I woud like to know how could I make an image repeat 4x vertically and
2x horizontally in a html document using css?

Thanks:)
 

smoovo

New Member
4 times vertically is 4 times your image height, 2 times horizontally it's 2 times your image width. so let's say your image is 120px W/100px H you have now image 240px W/400px H.

In HTML you can open a div, with style that gives it a size and gives it your image as a background.

the div...
HTML:
<div id="img-repeat"></div>

and the CSS...
HTML:
#img-repeat {width:240px; height:400px; background:url('your image url here') repeat;}

That's it, enjoy! :)
 
Top