Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New to the CF scene
    Join Date
    Oct 2009
    Posts
    7
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Positioning Problem

    Hi,
    I'm having trouble with my footer's positioning. If I leave my wrapper div's position with the default value its background doesn't repeat.

    But If I make the wrapper's position absolute the background works, but the footer doesn't clear.

    Update: Solved!
    Last edited by flackend; 10-20-2009 at 03:58 PM. Reason: Solved

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,667
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello flackend,
    try making a few changes to your CSS, like this:
    Code:
    body {
    	font-family: Helvetica, Arial, sans-serif;
    	background-repeat: repeat;
    	background-image: url(images/background.jpg);
    }
    * {
    	padding: 0px;
    	margin: 0px;
    }
    #header {
    	padding: 16px 60px 0 0;
    	line-height: 30px;
    	font-size: 22px;
    	font-weight: bold;
    	text-align: right;
    	background-image: url(images/header.png);
    	background-repeat: no-repeat;
    	margin: 30px 0 10px 0;
    	width: 780px;
    }
    
    #wrapper {
    	background-image: url(images/column.png);
    	background-repeat: repeat-y;
    	width: 840px;
    overflow: auto;
    }
    
    #sidebar {
    	float: left;
    	width: 140px;
    	padding: 10px;
    }
    
    #content_wrapper {
    	padding: 10px 60px;
    	margin-left: 160px;
    	width: 560px;
    }
    
    #content {
    	float: right;
    	margin-top: -180px;
    }
    
    #footer {
    	clear: both;
    	background-color: #cccccc;
    	background-repeat: repeat;
    	width: 100%;
    }
    
    #content_btm {
    	background-repeat: no-repeat;
    	background-image: url(images/content_btm.png);
    	margin: 0 0 0 190px;
    	height: 10px;
    	width: 620px;
    }
    
    /* style */
    
    a:link.nav, a:visited.nav {
    	color: black;
    	text-decoration: none;
    }
    
    a:hover.nav {
    	background-color: black;
    	color: white;
    }
    
    a:active.nav {
    	background-color: white;
    	color: black;
    }
    
    /* entry style */
    
    h1 {
    	color: #333333;
    	font-size: 20px;
    	margin: 0px;
    	font-weight: bold;
    	padding: 0px;
    }
    
    .date {
    	color: #333333;
    	font-style: normal;
    	font-weight: normal;
    	line-height: 30px;
    	font-size: 14px;
    }
    
    .tags {
    	color: #999999;
    	word-spacing: 10px;
    	margin-left: 10px;
    	line-height: 30px;
    	font-size: 10px;
    	font-style: normal;
    	font-weight: normal;
    }
    
    p {
    	color: #333333;
    	line-height: 20px;
    	font-size: 16px;
    	padding: 0px 0px 20px 0px;
    	margin: 0px;
    }
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #3
    New to the CF scene
    Join Date
    Oct 2009
    Posts
    7
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Excavator View Post
    Hello flackend,
    try making a few changes to your CSS, like this:...
    The * {padding: 0; margin: 0;} is cool, I've never used that.

    With new CSS:



    Not quite there

  • #4
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,667
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Quote Originally Posted by flackend View Post

    Not quite there
    Could you be more specific?
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #5
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,667
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Maybe this?
    Code:
    #footer {
    	clear: both;
    	background: #cccccc;
    margin: 10px 0 0;
    }
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #6
    New to the CF scene
    Join Date
    Oct 2009
    Posts
    7
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Excavator View Post
    Maybe this?
    I just updated the first post with more info appended to the bottom of the post.

  • #7
    New to the CF scene
    Join Date
    Oct 2009
    Posts
    7
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Excavator View Post
    Maybe this?
    Do you see how the header image actually extends to where the footer is? The sidebar and content divs have negative top-margins so that they are on top of the header div's background-image.

    See the difference in the image in post 3.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •