Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS background not sizing right when website zooming in/out Re: background not sizing right when website zooming in/out

#96123
TheDoc
Member

For backgrounds? No, if you’re trying to center a background to a person’s monitor, you’ll want to use ‘center’. Example:

body { background: url('images/my-background.jpg') center top; }

That means it’ll be centered horizontally and will be snug to the top.

Example: http://dabblet.com/gist/1731709