Use the data url method for setting the background of an element without images:

css
.ptn {
    background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAG0lEQVQIW2NkYGD4z8DAwMgABXAGNgGwSgwVAFbmAgXxvZSoAAAAAElFTkSuQmCC) repeat;
}

You can use clever online tools like Patternify by @SachaGreif to create nice patterns.