CSS: center background image in Firefox & Co.

Today just a short snippet.

To center a background image vertical and horizontal especially Mozilla Firefox need the attribute “fixed”:

body {
background-image: url(....);
background-position: center center;
background-attachment: fixed;
height: 100%;
}

Tested with: IE 6 – 8, Firefox 3.6, Safari 4

With this little trick, my day will be fine! Ole.

Related posts:

  1. How to … center a YAML Layout
  2. How to … style the dotted link border in Firefox
  3. How to add german Amazon.de OpenSearch Plugin to Firefox 3.5 on Ubuntu 9.1
  4. How to build a YAML fullscreen layout
  5. How to use transparency with different Browsers
  6. CSS border-bottom for IE 6
  7. Aptana IDE Webdevelopment
  8. How to use position-absolute and z-index with Internet Explorer 7 and nested containers

0 Responses to “CSS: center background image in Firefox & Co.”


  1. No Comments

Leave a Reply

*