GermanPrince Posted November 28, 2009 Share Posted November 28, 2009 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 More sharing options...
jeffman Posted November 28, 2009 Share Posted November 28, 2009 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 More sharing options...
Synook Posted November 29, 2009 Share Posted November 29, 2009 You can't specify the width of a background-image, if that is what you are asking. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.