Centering your background with CSS

So everyone has these new extra wide screens and displays, and now you want a nice background image to site behind your centered webpage. You want it to stay centered even when they resize the screen? No more talk, here it is:

body{ font-size:12px;
background-position:top center;
margin-top: 100px;}

This will give you a nice fixed image, that stays in place and stays centered around your body and content the way nature intended.

About author

Todd Kron

of Sellaholics is a veteran of Analytics, PPC, Display, video, UX, conversion optimization, affiliate programs, web design and web programming since 2002. My background includes affiliate sales to 6 figures, director of a web design agency, and currently the digital manager for a leading energy company located in Huntersville, NC. From search to sale 1000 different ways is my background. Sellaholics is a Google Partner Agency.

Related Articles