Thread: CSS - Footer

    #1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2002
    Posts
    194
    Rep Power
    13

    CSS - Footer


    I've created a web page using this CSS layout code:

    Code:
    <style type="text/css">
    	
    	body {
    		text-align:center;
    		}
    	
    	#frame {
    		width:650px;
    		margin-right:auto;
    		margin-left:auto;
    		margin-top:10px;
    		padding:0px;
    		text-align:left;
    		}
    		
    	#contentmain {
    		width:220px;
    		padding:0px;
    		float:left;
    		background:#fff;
    		}
    	
    	#contentmenu {
    		width:430px;
    		padding:0px;
    		float:left;
    		background:#eee;
    		}
    	
    	#contentheader {
    		background:#fff
    		}
    	
    </style>
    I want to include some 'contentfooter' code, but I'm not sure how to make sure the code clears both the 'contentmain' and 'contentmenu' columns and is posted below both of them?

    Can anyone tell me how I can do this?

    Thanks.
  2. #2
  3. No Profile Picture
    The Forest
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2002
    Posts
    321
    Rep Power
    13
    Code:
    clear: both;
    Hope that helps!

    Happy coding!
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2002
    Posts
    194
    Rep Power
    13
    Thank you nolachrymose!

    I'm having a problem though...

    When I tested the page, the 'contentmenu' section was being displayed directly below the 'contentmain' section. So I changed the "float:left;" code to "float:right;", and while it's now on the right side of the page, it's still being displayed below the 'contentmenu' section.

    Can you tell me what I've done wrong?

    Thanks.
  6. #4
  7. No Profile Picture
    The Forest
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2002
    Posts
    321
    Rep Power
    13
    Did you put set the "clear" property to "both" on the footer, or on contentmenu and contentmain? If you set it to contentmenu and contentmain, you need to get rid of that and set the property for contentfooter.

    Happy coding!

IMN logo majestic logo threadwatch logo seochat tools logo