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 8 of 8

Thread: Layout trouble

  1. #1
    Junior Member
    Join Date
    Mar 2011
    Posts
    26
    Member #
    27233
    Liked
    1 times
    I am have trouble with my layout. My container/content is not extending to the bottom of the page across all computers in our office and I don't know why (aside from them all being different sizes/resolutions) bc I am not using anything like a float in my code. I know it is something simple, but for some reason the answer is just not popping out to me! Please help

    The code is:

    <?php
    session_destroy();
    ?>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <?php require_once 'trainingheaders.php';?>
    <style type="text/css">
    body {
    background-image: url(background1.jpg);
    background-repeat: repeat;
    background-position: center;
    }
    h1 {
    font-size: 36px;
    }
    table.center {
    margin-left:auto; margin-right:auto;
    font-family:Arial, Helvetica, sans-serif;
    }
    #mainContainer {
    height: 750px;
    }
    #content {
    background-image: url(login.png);
    background-position: center;
    background-repeat:no-repeat;
    height: 250px;
    }
    #footer {
    position:absolute;
    bottom:0;
    height:30px; /* Height of the footer */
    width: 960px;
    background-color: #FFF;
    text-align:center;
    font-size:x-small;
    }
    </style>
    <body>

    <div id="header"><img src="NewLeaderboard.jpg" /></div>

    <div id="mainContainer">
    <a href="trainingportal.php">Home</a>
    <div id="content">
    <h1>Training Portal</h1>


    <form id="form1" name="form1" method="post" action="trainingvalidate.php">
    <table border="0" cellspacing="5" cellpadding="2" class="center">
    <tr>
    <td>Username (email):</td> <td><input type='text' name='Username1' /><br /></td>
    </tr>
    <tr>
    <td>Password:</td> <td><input type='password' name='Password1' /><br /></td>
    </tr>
    <tr>
    <td><input type="hidden" name='key' value='330ihe'/><br /></td>
    <td><input type='submit' value='Submit' /></td>
    </tr>
    </table>
    </form>
    <p>&nbsp;</p><p>&nbsp;</p>
    </div>
    <div id="footer">
    <a href="http://www.flocis.com/training">
    Home</a>
    |
    <a href="http://www.flocistraining.com">
    Cart</a>
    |
    <a href="http://www.flocis.com">
    FloCis.com</a>
    |
    <a href="traininghelp.php">
    Help</a>
    |
    <a href="mailto:support@flocis.com">
    Contact Us</a>
    </div>
    </div>
    </body>
    </html>

  2.  

  3. #2
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,485
    Member #
    425
    Liked
    2783 times
    Change position: absolute; on your footer to position: fixed; . I'm guessing that the reason you want the footer is to fix the bottom menu.

    Mind you, a primary footer menu is not good usability. People expect menus at the top and left.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  4. #3
    Junior Member
    Join Date
    Mar 2011
    Posts
    26
    Member #
    27233
    Liked
    1 times
    My problem is the content/container background (white) isn't extending to the footer. I am having to set a height to get it to meet together. I gave your suggestion a shot to see if it would fix it and I am still having the same issue

  5. #4
    WDF Staff AlphaMare's Avatar
    Join Date
    Oct 2009
    Location
    Montreal, Canada
    Posts
    4,570
    Member #
    20277
    Liked
    878 times
    Try setting the height to 100% instead of using a defined pixel height.
    Good design should never say "Look at me!"
    It should say "Look at this." ~ David Craib


    http://digitalinsite.ca ~ my current site . . info@digitalinsite.ca ~ my email

    If you feel that someone's post helped you fix your problem, answered your question, or just made you feel better, feel free to "Like" their post. The "Like" link is at the bottom right of each post, along side the "reply" link. And if you are being helped here, try to help someone else - pass it on!

  6. #5
    Junior Member
    Join Date
    Mar 2011
    Posts
    26
    Member #
    27233
    Liked
    1 times
    Already tried that The only reason I defined the height was so that in the mean time it would reach the bottom.

  7. #6
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,485
    Member #
    425
    Liked
    2783 times
    If it's not related to your footer menu, what you're asking for is for all practical intents and purposes impossible. People have different screen resolutions and set their text sizes and magnification levels.

    The only reason I could have come up with to extend the content is if you want the footer menu at the bottom of the page (in which case I've given you the answer). There really isn't any other reason to want this.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  8. #7
    Senior Member Webzarus's Avatar
    Join Date
    May 2011
    Location
    South Carolina Coast
    Posts
    3,322
    Member #
    27709
    Liked
    770 times
    did you try a padding: 0 0 50% 0; on the mainContainer...

    this should throw a white space 1/2 the height of the screen after the content... so unless you only have 1 line of text.... this should get you a little closer to what your trying to do...

    OR

    min-height: 750;

    if everyone is using a standards compliant browser, this will set the height to a minimum of 750, but if your content exceeds that... it will allow the container to expand....

    if your css works on all the other pages... you may want to just create a separate css just for the login and tweak it to make it work... without affecting the other pages

  9. #8
    Junior Member Mercedes Marie Calayag's Avatar
    Join Date
    Jun 2011
    Location
    Makati
    Posts
    15
    Member #
    28013
    Liked
    4 times
    Try doing this to your footer class:

    Code:
    #footer {
       position:fixed;
       left:0px;
       bottom:0px;
       height:30px;
       width:100%;
       background:#999;
    }
    
    /* IE 6 */
    * html #footer {
       position:absolute;
       top:expression((0-(footer.offsetHeight)+(document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight)+(ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop))+'px');
    }


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