Closed Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: [Help Needed] CSS - Extra pixels below footer need removing

  1. #1
    Paxjah is offline Newbie
    Join Date
    Sep 2009
    Posts
    6
    Rep Power
    0

    Question [Help Needed] CSS - Extra pixels below footer need removing

    I am not a newbie, but I am frustrated with what could possibly be a very simple problem, and I cannot seem to solve it.

    I have 25 pixels of extra space below my footer that should not exist.

    I want my #footer to stay at the bottom, my #containerr to stretch the height of the page but I also want #bkg to remain outside the #container and stay static at the top.

    The reason it is adding 25 pixels is definately because of #bkg ( height: 25px; ) and with my container height 100%, it adds the extra 25 pixels to that and shoves it below footer.

    There must be a way to get rid of it.

    I have attached my code below. Please if anyone can help, or even point me in the right direction, I will very much appreciate it. Thankyou

    HTML:
    Code:
    <body>
    
    <div id="bkg">
    
    	<div id="top"></div>
    
    </div>
    
    <div id="container">
    
    	<div id="header"></div>
        
        <div id="menu"></div>
        
        <div id="wrapper">
        
        	<div id="line"></div>
        
        	<div id="content"></div>
            
    	</div>
        
        <div id="footer"></div>
        
    </div>
    
    </body>
    CSS:
    Code:
    html, body {
    	background: #464646;
    	margin: 0;
    	padding: 0;
    	height: 100%;
    }
    
    #bkg {
    	background: #383838;
    	margin: 0;
    	padding: 0;
    	width: 100%;
    	height: 25px;
    }
    
    #top {
    	background: #CCC url(../images/halloween/bkg_top.png) no-repeat;
    	margin: 0 auto;
    	padding: 0;
    	width: 814px;
    	height: 25px;
    }
    
    #container {
    	background: #6FF url(../images/halloween/bkg_container.png) repeat-y;
    	margin: 0 auto;
    	padding: 0;
    	width: 814px; /* -14px for left and right padding */
    	height: 100%;
    }
    
    #header {
    	background: #FF6;
    	margin: 0 0 0 7px;
    	padding: 0;
    	width: 800px;
    	height: 75px;
    }
    
    #menu {
    	background: #06F url(../images/halloween/bkg_menu.png) repeat-x bottom;
    	margin: 0 0 0 7px;
    	padding: 0 0 4px 0;
    	width: 800px;
    	height: 33px; /* -4px for bottom padding */
    }
    
    #wrapper {
    	background: #F6C;
    	margin: 0 0 0 7px;
    	padding: 0;
    	width: 800px;
    	height: auto;
    }
    
    #line {
    	margin: 0;
    	padding: 0;
    	width: 800px;
    	height: 4px;
    }
    
    #title {
    	background: #C00;
    	margin: 0;
    	padding: 12px 0 12px 0;
    	width: 800px;
    	height: 16px; /* -24px for top and bottom padding */
    	text-align: center;
    }
    
    #content {
    	background: #33C;
    	margin: 0;
    	padding: 0 20px 0 20px;
    	width: 760px; /* -40px for left and right padding */
    	height: auto;
    }
    
    #footer {
    	background: #60F url(../images/halloween/bkg_footer.png) no-repeat;
    	margin: 0 0 0 7px;
    	padding: 0;
    	width: 800px;
    	height: 88px;
    	bottom: 0;
    	position: absolute;
    }
    Last edited by Paxjah; 10-20-2009 at 09:02 AM.

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Join Date
    Aug 2009
    Location
    ~/
    Posts
    918
    Rep Power
    19

    Re: [Help Needed] CSS - Extra pixels below footer need removing

    What is the actual height dimension of bkg_footer.png is it around 63px??

  4. #3
    Paxjah is offline Newbie
    Join Date
    Sep 2009
    Posts
    6
    Rep Power
    0

    Re: [Help Needed] CSS - Extra pixels below footer need removing

    Quote Originally Posted by debtboy View Post
    What is the actual height dimension of bkg_footer.png is it around 63px??
    No, it is 88px exactly

  5. #4
    Join Date
    Aug 2009
    Location
    ~/
    Posts
    918
    Rep Power
    19

    Re: [Help Needed] CSS - Extra pixels below footer need removing

    why is your footer absolute??

  6. #5
    Paxjah is offline Newbie
    Join Date
    Sep 2009
    Posts
    6
    Rep Power
    0

    Re: [Help Needed] CSS - Extra pixels below footer need removing

    Quote Originally Posted by debtboy View Post
    why is your footer absolute??
    To have it stay at the bottom of the page, only problem is there seems to be something non-existent with a height of 25 pixels pushing it up and making a space which should not be there.

  7. #6
    Join Date
    Aug 2009
    Location
    ~/
    Posts
    918
    Rep Power
    19

    Re: [Help Needed] CSS - Extra pixels below footer need removing

    what happens when you use
    margin-bottom: 88px;
    under #content??

  8. #7
    Paxjah is offline Newbie
    Join Date
    Sep 2009
    Posts
    6
    Rep Power
    0

    Re: [Help Needed] CSS - Extra pixels below footer need removing

    Quote Originally Posted by debtboy View Post
    what happens when you use
    margin-bottom: 88px;
    under #content??
    Sorry for the later reply!

    Nothing happens at all, the look stays the same

  9. #8
    Join Date
    Aug 2007
    Location
    Gizeh, Al Jizah, Egypt, Egypt
    Posts
    8,675
    Blog Entries
    12
    Rep Power
    81

    Re: [Help Needed] CSS - Extra pixels below footer need removing

    do you have a link for the actual page or an HTML file?

    try removing the "height: 100%;"
    sometimes height/width attributes act funny on IE
    yo homie i heard you like one-line codes so i put a one line code that evals a decrypted one line code that prints "i love one line codes"
    Code:
    eval(base64_decode("cHJpbnQgJ2kgbG92ZSBvbmUtbGluZSBjb2Rlcyc7"));
    www.amrosama.com | the unholy methods of javascript

  10. #9
    Paxjah is offline Newbie
    Join Date
    Sep 2009
    Posts
    6
    Rep Power
    0

    Re: [Help Needed] CSS - Extra pixels below footer need removing

    Quote Originally Posted by amrosama View Post
    do you have a link for the actual page or an HTML file?

    try removing the "height: 100%;"
    sometimes height/width attributes act funny on IE
    I've tried this to no avail. I know what my problem is, I want my #footer to stay at the bottom, my #containerr to stretch the height of the page but I also want #bkg to remain outside the #container and stay static at the top.

    The reason it is adding 25 pixels is definately because of #bkg ( height: 25px; ) and with my container height 100%, it adds the extra 25 pixels to that and shoves it below footer.

    There must be a way to get rid of it.

  11. #10
    Join Date
    Sep 2007
    Location
    Karlstad, Sweden
    Posts
    3,082
    Blog Entries
    7
    Rep Power
    42

    Re: [Help Needed] CSS - Extra pixels below footer need removing

    set your footer to 88-25 = 63px and see what that can do? stupid suggestion that might work
    __________________________________________
    I study Information Systems at Karlstad University when I'm not on CodeCall

Closed Thread
Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Object Detection using Get/Set Pixels
    By Blimp in forum Visual Basic Programming
    Replies: 0
    Last Post: 04-27-2011, 09:25 AM
  2. CSS Columns overwrite footer
    By vrjory in forum JavaScript and CSS
    Replies: 0
    Last Post: 10-03-2008, 01:54 PM
  3. pixels in a <br />
    By drotar in forum HTML Programming
    Replies: 3
    Last Post: 11-24-2007, 08:55 AM
  4. Replies: 5
    Last Post: 04-17-2007, 08:34 AM

Tags for this Thread

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