html - How can I set a background pattern to begin repeating from the center of my page? -


i want background repeat-x @ top of page, want begin repeating center, not across whole page. example this:

enter image description here

one way use ::after pseudo selector this:

body::after {     content: '';     position: absolute;     left: 50%;     right: 0;     top: 0;     bottom: 0;     z-index: -1;     background: url('http://i.imgur.com/2xpv3gf.png') repeat-x left top; } 

fiddle: http://jsfiddle.net/vf4rm/


Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -