Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 6 of 6
  1. #1
    Senior Member
    Join Date
    May 2003
    Location
    UK
    Posts
    2,354
    Member #
    1326
    Im nearing the end of a website I am making and I have a placed a footer (5 words).

    However, I use php includes for the websites links, and this mucks up where the footer appears.

    I have my page content on the left, and my links on the right.

    If the page content is less than the height of the links area, the footer is centered, which is what I would like always.

    However sometimes the footer ends up tucked under the links area.

    Here is sample code of index.php

    Code:
    <div style="display: inline;">
    <div class="pagedetails">
    text...
    </div>
    </div>
    
    <?php
      include("includes/menu.php");
    ?>
    The footer code is in menu.php

    I guess I could use absolute positioning but I prefer not to.

    Anyone else have any ideas?

    I took the lame approach of adding a lot of <br />'s but again this is useless as on some pages there will be a lot of content (in this instance the footer will be way down the page) and some pages the footer will be in the middle/too close.

    Sorry I cannot link you as the website is still being developed.

  2.  

  3. #2
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    Hmm... I'm not sure I can visualize the structure of everything, but could you try putting the two divs (details/links) inside another div, and follow those two with the footer? That is to say:
    HTML Code:
    <div id="content">
        <div id="top">
            <div style="display: inline;" id="pageLinks">
            </div>
            <div style="display: inline;" id="pageDetails">
            </div>
        </div>
        <div id="footer">
           <?php include( "includes/menu.php" ); ?>
        </div>
    </div>
    Or something along those lines. Or am I totally missing how the page is working?

  4. #3
    Senior Member
    Join Date
    May 2003
    Location
    UK
    Posts
    2,354
    Member #
    1326
    Hm.

    I will try and explain it more thoroughly.

    Code:
    <div style="display: inline;">
    <div class="pagedetails">
    <strong>Main content</strong>
    <br /><br />
    this is the main content area. this has no align property or such and is situated on the left of the page.
    </div>
    </div>
    Then I include menu.php outside of all divs

    PHP Code:
    include("menu.php"); 
    And menu.php is
    Code:
    <div style="display: inline;">
    <div class="pagedetailsmisc">
    <fieldset class="links">
    	<legend>
    		<strong>Links</strong>
    	</legend>
    // links (bog standard html)
    </fieldset>
    </div>
    </div>
    And what I want to happen is... for the footer to go below both the main content and the menu.php, centered.

    Well, heres the link anyway, as its nearly done (not all links are live but you can see what I want to do)
    http://uploadable.info

    However I have not included the footer in the source as I wanted to solve it offline first.

  5. #4
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    Hmm... I can't think why that might be the case. I still think wrapping the two inline divs in an outside div might help, but if you've got both of them in separate files then that's probably a bad idea.

    By the way, why do you have your content wrapped in two divs instead of just one?

  6. #5
    Senior Member Rince's Avatar
    Join Date
    Nov 2004
    Posts
    183
    Member #
    8318
    The include it thoughing you, but that's not the problem. All the include does if insert the footer file's html where the include statement is. You could test without the include by just copy/pasting the code in and checking in your browser.

    What you have ommited is the important bit - your css. It's not possible for use to know how you layed out you page (whither your divs are inline, floated, absolute positioned or what) so we can only guess. However, best guess, add the css code "clear:both;" to the footer. This should stop it going to the side of any element that has a float setting (I suspect you links menu is set to "float:left;".

    P.S. link to you site gives a php error.

  7. #6
    Senior Member
    Join Date
    May 2003
    Location
    UK
    Posts
    2,354
    Member #
    1326
    D'oh! Thanks for the info Rince, I mucked up a query somewhat!


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 01:16 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com