Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS CSS Basics (2014) Basic Layout Backgrounds: Color and Images

Is it possible to tell the browser how many times to repeat?

Is it possible to tell the browser how many times to repeat?

4 Answers

Steven Parker
Steven Parker
229,644 Points

You can certainly repeat things using JavaScript, or by just replicating the HTML tags.

You could repeat an image horizontally and use CSS to make the combined width no more than the browser width.

I was wondering, if I could repeat an image 2 or three times, but still be below 100% of the total browsers width.

Steven Parker
Steven Parker
229,644 Points

Indeed you can (and I updated my answer).

Ok! Thanks for helping me!

Steven Parker
Steven Parker
229,644 Points

Glad to help, and if you need more specific assistance with code, be sure to show your code (or provide a link to a repo or snapshot) when you ask the question.

Ok, thanks!