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 4 of 4
  1. #1
    Junior Member
    Join Date
    Sep 2011
    Posts
    2
    Member #
    29271
    Hi everyone,

    I have a very simple question I believe. I have a footer.php that I put on my main page and all subpages (to make it easier so I can change the footer in one location). And I am trying to make it so the footer remains at the center of the fixed-width no matter what size the browser window is. For example, I want my pages to be 950px width and the footer always be in the center, so that even when I resize the browser to as small as it goes, it simply COVERS the footer, rather then moving it with the resized window. Much like apple.coms footer.

    Thank you for your help

  2.  

  3. #2
    Junior Member
    Join Date
    Sep 2011
    Posts
    2
    Member #
    29271
    solved it:

    <html>
    <head>
    <link rel="stylesheet" href="/index_media/footer.css" type="text/css" />

    </head>
    <body>

    <style type="text/css">
    #footer-container {
    /* centering for IE */
    text-align: center;
    }
    #footer {
    width: 950px;
    /* undo text-align on container */
    text-align: center;
    /* centering for other browsers */
    margin: auto;
    }

    </style>

    <div id="footer-container">
    <div id="footer">
    <font color="white" size="-4" face="arial">footer stuff
    </div>
    </div>

    </body>
    </html>

  4. #3
    Senior Member Webzarus's Avatar
    Join Date
    May 2011
    Location
    South Carolina Coast
    Posts
    3,322
    Member #
    27709
    Liked
    770 times
    That's the way I'd do it, but only if the main container of the site is set to 950PX, I rarely use fixed width these days, so with a liquid layout, I'd set the footer width to something like 80% with 10% margins on each side of the div...

    but that's just me.

  5. #4
    Member christopher_b's Avatar
    Join Date
    Aug 2011
    Location
    Pretoria, South Africa
    Posts
    69
    Member #
    29042
    Liked
    7 times
    Hey Chris G, I just noticed that you are using old HTML code "<font>" you should rather look into spans if you want to use that kinda coding.

    Cheers.


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 07:41 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com