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 3 of 3
  1. #1
    Senior Member
    Join Date
    May 2003
    Location
    UK
    Posts
    2,354
    Member #
    1326
    Hey. Im gonna submit a hows my site, my first, but i have this problem.

    I have a footer, and want it to appear at the bottom of the containing div, but it wont. So instead I create a useless div with like 9 br's in, which sux.

    Any ideas?

    Code:
    <div class="container">
    <div class="container">
    <div class="header"><h2>Welcome To Bfsog Web Design</h2><h3>Quality Assured</h3></div>
    
    <div class="nav"><div class="sectionLinks">
    <a href="#">Home</a>
    <a href="#">About</a>
    <a href="#">Portfolio</a>
    <a href="#">Forum</a>
    <a href="#">Contact</a></div></div>
    
    <div class="content">no break in space</div>
    
    <div><br><br><br><br><br><br><br><br><br></div>
    
    <div class="footer" >put my feet here</div>
    </div>
    and in the container style...
    Code:
    .container {
    width: 730px;
    height : 600px;
    border: 1px solid gray;
    margin: 10px;
    margin-left: auto;
    margin-right: auto;
    padding: 10px;
    }
    and finally in the footer style
    Code:
    .footer {
    clear: both;
    padding: 5px;
    margin-top: 5px;
    background-color: #ccccff;
    color: black;
    vertical-align: bottom;
    font-family: "Arial",sans-serif;
    font-size: 75%;
    }
    I expect some CSS raving lunatic is gonna go crazy at me for being *dumb*

  2.  

  3. #2
    Senior Member Trico's Avatar
    Join Date
    Feb 2004
    Location
    Nottingham, UK
    Posts
    894
    Member #
    5081
    If you assign a fixed height value to your 'content' <div> you should simply be able to nest the footer underneath it. This does cause problems if you have content that will vary in length, (most sites do.)

    You will find this article very useful.

    Did you intend to write <div class="container"> twice or is it a mistake when writing this post? There's also an extra space on the second to last line of html code and a surplus space within your CSS .container class on the height; again I don't know if this was simply an error when copying it here, but otherwise you'll want to ammend these.

    Code:
    margin: 10px;
    margin-left: auto;
    margin-right: auto;
    Can be re-written to the following, as they mean the same thing... it's just more efficient with less bulky code.

    Code:
    margin: 10px auto;

  4. #3
    Senior Member
    Join Date
    May 2003
    Location
    UK
    Posts
    2,354
    Member #
    1326
    Yes. they were mistakes.

    I thought of putting the footer div outside of the container div, but then it would not fit in with the original design.


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