I'm trying to repeat-y an image that's in a div and no background image but haven't figured how. Could you please point me to a solution?
My code looks like this:
<div id="rightflower">
<img src="/image/layout/lotus-dreapta.png" style="repeat-y; width: 200px;"/>
</div>
Not with CSS you can't. You need to use JS. A quick example copying the img to the background:
Or you can actually repeat the image, but how many times?
It would probably be easier to just fake it by using a div. Just make sure you set the height if its empty so that it can actually appear. Say for instance you want it to be 50px tall set the div height to 50px.
And in your style sheet just add the background and its properties, height and width, and what ever positioning you had in mind.
You have use to
repeat-y
asstyle="background-repeat:repeat-y;width: 200px;"
instead ofstyle="repeat-y"
.Try this inside the image tag or you can use the below css for the div
(DEMO)
Codes:
and