WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Fixed footer position - get page name/id into css class (5 posts)

  1. vandamar
    Member
    Posted 4 years ago #

    In desperate need of help.

    I am making a custom theme for a client, and they are adamant that the footer be at a specific height on most pages. Problem is I can't get this to work.

    I'm using blueprint.css for my theme (http://www.blueprintcss.org/tests/parts/grid.html). I've tried a bunch of things, and my last resort was using a spacer.gif image on every page, but alas that has failed too.

    My structure is as follows

    <html>
    <head>
    <title></title>
    <?php wp_head(); ?>
    </head>
    
    <div class="container">  
    
        <div id="head" class="span-24 last"></div>
    
        <div id="content" class="span-24 last">
    <!-- End header.php -->
    
        <!-- Page/ post content goes here -->
    
    <!-- Begin footer.php -->
        </div>
    
        <div id="footer" class="span-24 last"></div>
    
        <?php wp_footer(); ?>
    
    </div>

    My permalinks are set to: /%page%/%category%/

    How can I add a custom id/class to the <div id="content" class="span-24 last"> in header.php for each page?

    Please help.

  2. esmi
    Forum Moderator
    Posted 4 years ago #

    Via the theme's stylesheet:

    .content {
    height:600px;
    overflow:hidden;
    }
  3. vandamar
    Member
    Posted 4 years ago #

    Hi esmi.

    Problem is that I don't want to hide the overflow! Basically say my ideal height is 600px and that my footer should start at 600px from the top.

    Some pages have content that fits in 500px and some pages in 700px. in the case of 700px, client is willing to let it hang there. However for pages that are 500px, the client still wants the footer to sit at 600px, and since all pages vary i can't use padding or margin or anything like that.

    Any suggestions?

  4. alchymyth
    Forum Moderator
    Posted 4 years ago #

    css min-height
    and maybe overflow-y:auto

  5. vandamar
    Member
    Posted 4 years ago #

    alchymyth, min-height did it.

    Thank you so much.

Topic Closed

This topic has been closed to new replies.

About this Topic