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

Thread: Header Problem

  1. #1
    New to the CF scene
    Join Date
    Dec 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Header Problem

    I am having a problem positioning a header.

    This is sort of a noobish thing, one might say.

    http://uploadthis.net/lucas/site/site.php is the site.

    As you can see, the little octopus w/ bomb and the title is misplaced. I can't seem to change it.

    Also, the CSS is at http://uploadthis.net/lucas/site/style.css

    Please tell me what I can do to fix this, how I could optimize my code, and any mistakes you catch.

    Don't worry, it's only about 70 lines of code total.

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,746
    Thanks
    22
    Thanked 1,838 Times in 1,822 Posts
    Hello theawesomelucas - Merry Christmas!

    Sometimes, during development, it helps to put a different background color on each div. Your header is 790px wide while the #333333 #container is only 760px.

    Code:
    #container {
    		width: 760px;		margin: 200px auto 50px auto;
    		padding: 25px 0 25px 0;
    		text-align: left;
    		background: #333333;
    		font-family: Verdana;
    		}
    		#news {
    		padding: 10px;
    		}
    		#header {
    		margin: 0 auto 0 auto;
    		width: 790px;
    		height: 197px;
    		background: url('img/bg.png') no-repeat bottom;
    		}
    Check the suggestion about validating often in my sig below.
    You should really think about styling from your CSS and not using inline styles too. It makes it a LOT easier to debug or change later.
    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
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    validate for html, you have 3 error or less:

    http://validator.w3.org/check?verbos...ite%2Fsite.php

    validate for css, but after html validation

    http://jigsaw.w3.org/css-validator/v...ite%2Fsite.php

    best regards


  •  

    Posting Permissions

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