SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict Smola's Avatar
    Join Date
    Mar 2005
    Posts
    260
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Angry background-position failing me in FF

    Hey everyone. I am using FF v2.0.0.13 and it is not cooperating with my background-position property. I want it to be center center so I used this code (in its entirety):

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Untitled Document</title>
    </head>
    
    <body style="background:#FFF url(images/misc/clapboard.png) no-repeat scroll center center;">
    <p>hello</p>
    </body>
    </html>
    It shows up horizontally centered but with a negative margin! The top of the clapboard is cut off by the top of the page by about 15 pixels.

    However, our good friend IE7 renders the background image exactly where it should be: the very center of the page. With so little code I don't see why FF won't render my stuff correctly. Any ideas?

  2. #2
    SitePoint Guru
    Join Date
    Nov 2005
    Location
    Norway
    Posts
    715
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    html { height: 100&#37;; }
    I believe that will fix it

  3. #3
    SitePoint Addict Smola's Avatar
    Join Date
    Mar 2005
    Posts
    260
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you!!! Brilliant!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •