I'm trying to tessellate a .png file I made, in the body of a HTML document.
For the life of my I can't find out why it's not doing it. I've got the image stored locally but for the sake of making a code pen I've uploaded it to imgur.
http://codepen.io/MartinBort/pen/CbwgJ Relevant code starts at line 5 of the CSS
https://i.sstatic.net/0h31R.png <-- that's the image
body {
background-image: url("https://i.sstatic.net/0h31R.png") repeat;
}
Any ideas?
Thanks
3 Answers 3
Use this
body {
background: url("http://i.imgur.com/Jy6hCro.png") repeat;
}
or this remove repeat in background-image and add other style background-repeat:repeat; but background-image defaoult repeated
body {
background-image: url('http://i.imgur.com/Jy6hCro.png');
background-repeat:repeat;
}
1 Comment
no-repeat.body {
background-image: url("http://i.imgur.com/Jy6hCro.png");
background-repeat:repeat;
}
codepen
Comments
As the other answers suggest, the problem is the repeat word in the backgroung-image property. You cannot give the repeat property in the image property. If you want to combine them use the background property such as:
body {
background: url("http://i.imgur.com/Jy6hCro.png") repeat;
}
Or, specify it seperately, such as:
body {
background-image: url("http://i.imgur.com/Jy6hCro.png");
background-repeat:repeat;
}
Hope this helps!
repeatbackground-image can only containurlyou need to usebackground:if you want to addrepeator anything else in one property