Jump to content

Repeating Images


GermanPrince

Recommended Posts

For having a background image you can use: body {background-image:url("pic.png"); background-repeat:repeat-y;}. How would I do this for <img>? Also when I try changing the width with the body one it doesn't work. Is it possible to do that also? Thanks.

Link to comment
Share on other sites

An img tag describes one image, one time. There is no repeat property and it does not take a background attribute. You could have multiple image tags right next to each other, or simply create a div the size you want and give it a repeating background the way you described. As always, the choice should depend on what the image is doing. If it's actual content, have multiple img tags. If it's decoration, make it a background.

Also when I try changing the width with the body one it doesn't work . . .
Sorry. Could you explain that a little more?
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...