0
votes

I'm creating a web-editor and created a 32x32 pixel background image for the canvas. I want to use different dynamic grid sizes for the editor, for eg. 8x8, 16x16, 32x32. So I need to set the background repeat size through css. Any ideas if it's possible to set the background repeat size? I'd like to avoid creating several background-image and classes. Thanks!

1
Can't you put the editor in a div that varies in width and then just add a background to that?Kevin Lynch

1 Answers

1
votes

You can use background-size in % for eg. background-size: 10%; And if you are targeting different sizes use @media rule and increase/decrease the percentage.