Results 1 to 3 of 3

Thread: Dynamic Footer position

  1. #1
    Join Date
    Oct 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Dynamic Footer position

    Hi,

    I know this has probably been done to death but I can’t seem to find a solution that fits. I am putting together a website using PowerCMS from WebAssist. This mean the length of the main content div and a right sided div (under the navigation) may have a dynamic length based on the content the user writes. The problem I have got is I need to make the footer sit at the bottom of which ever if these is the longest.

    the site is www.bestinresumes.com
    the CSS is www.bestinresumes.com/global.css

    any thoughts?

    Cheers,
    Kevin

  2. #2
    Join Date
    Feb 2009
    Posts
    23
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    what you can try is this:

    CSS:
    Code:
    * {
    	margin: 0;
    }
    html, body {
    	height: 100%;
    }
    .wrapper {
    	min-height: 100%;
    	height: auto !important;
    	height: 100%;
    	margin: 0 auto -142px; /* the bottom margin is the negative value of the footer's height */
    }
    .footer, .push {
    	height: 142px; /* .push must be the same height as .footer */
    }
    HTML:
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    	<head>
    ...
    	</head>
    	<body>
    		<div class="wrapper">
    		content
    			<div class="push"></div>
    
    		</div>
    
    		<div class="footer">
    			footer text
    		</div>
    
    
    	</body>
    </html>
    found with google on http://ryanfait.com/sticky-footer/

  3. #3
    Join Date
    Oct 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi,

    Thanks for the reply. I'd already had a look at that but I can get it to work.

    It seems there is a detachment between the other items in the page and the wrapper. Maybe it has something to do with all the items being in an absolute position.

    K

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
  •