0

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

asked Oct 19, 2014 at 12:49
1
  • 1
    your issue was the repeat background-image can only contain url you need to use background: if you want to add repeat or anything else in one property Commented Oct 19, 2014 at 12:54

3 Answers 3

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;
}
answered Oct 19, 2014 at 12:53
Sign up to request clarification or add additional context in comments.

1 Comment

Your second example won't remove the repeat. repeat is default to remove repeat you have to write no-repeat.
1
body {
 background-image: url("http://i.imgur.com/Jy6hCro.png");
background-repeat:repeat;
}

codepen

http://codepen.io/anon/pen/hdBqk

answered Oct 19, 2014 at 12:56

Comments

1

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!

answered Oct 19, 2014 at 12:59

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.