Search code examples
htmlcssimagerepeat

make image( not background img) in div repeat?


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>

Solution

  • You have use repeat-y as style="background-repeat:repeat-y;width: 200px;" instead of style="repeat-y".

    Try this inside the image tag or you can use the below css for the div

    .div_backgrndimg
    {
        background-repeat: repeat-y;
        background-image: url("/image/layout/lotus-dreapta.png");
        width:200px;
    }