Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Regular Coder
    Join Date
    Jun 2007
    Posts
    805
    Thanks
    123
    Thanked 23 Times in 23 Posts

    Background-position and FF

    Hi!

    How come that when I set my background-position to bottom, that FF dosn't understand it?

    It works in IE 6, but not in FF.

    How would I make the background STAY alligned to the bottom in FF?

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,861
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    Its working for me as per http://www.w3schools.com/css/pr_background-position.asp
    I think there may be some problem(height) in your code.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    Regular Coder
    Join Date
    Jun 2007
    Posts
    805
    Thanks
    123
    Thanked 23 Times in 23 Posts
    Well, see if u can spot the error. I can't?

    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=utf-8" />
    <title>Behrentzs.com - Page not found!</title>
    <style type="text/css">
    body {		background-color:#000;
    			background-image:url(gfx/404error.png);
    			background-position:bottom;
    			background-repeat:no-repeat;
    			font-size:13px;
    			color:#fff;
    			font-family:Verdana, Arial, Helvetica, sans-serif;
    			}
    			
    h1 {		font-size:20px;
    			color:#ff7700;
    			}
    			
    #text {		width:400px;
    			margin-right:auto;
    			margin-left:auto;
    			text-align:center;
    			filter:alpha(opacity=50); 
    			-moz-opacity:0.5; 
    			opacity:0.5;
    			}
    			
    a {			color:#fff;
    			font-weight:bold;
    			text-decoration:none;
    			}
    			
    a:hover	{	color:#ff6600;
    			}
    			
    #copyright {position:absolute;
    			bottom:0px;
    			font-size:10px;
    			}
    </style>
    </head>
    
    <body>
    <div id="text">
    <h1>Error 404 - Page not found!</h1><br/><br/>
    I'm sorry, but the page you requested might have been deleted, moved or just stolen by aliens!<br/><br/><br/>
    Please click <a href="http://www.behrentzs.com">here</a> to go back to Behrentzs.com, or check that you've requested the correct URL, as the page might not exist.
    <br/><br/><br/>
    Sorry for your inconvenience!
    </div>
    <div id="copyright">
    Copyright &copy; Behrentzs | All rights reserved
    </div>
    </body>
    </html>

  • #4
    Regular Coder
    Join Date
    Jun 2004
    Posts
    495
    Thanks
    0
    Thanked 82 Times in 80 Posts
    Code:
    html {
    	background-image:url(gfx/404error.png);
    	background-position:bottom;
    	background-repeat:no-repeat;
            background-color:#000;
            height:100%;
    } 
    body {
    	font-size:13px;
    	color:#fff;
    	font-family:Verdana, Arial, Helvetica, sans-serif;
    }

  • Users who have thanked Fang for this post:

    CaptainB (10-14-2007)

  • #5
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,861
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    Hmm.. My assumption was right.
    If you add border:1px solid #fff; to your body's CSS, you can see that your body is not stretching to fill the browser area.

    So just add html{height:100%;} to fix it
    Last edited by abduraooft; 10-14-2007 at 02:10 PM.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • Users who have thanked abduraooft for this post:

    CaptainB (10-14-2007)

  • #6
    Regular Coder
    Join Date
    Jun 2007
    Posts
    805
    Thanks
    123
    Thanked 23 Times in 23 Posts
    Ahh, thanks!


  •  

    Posting Permissions

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