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

Thread: header problem

  1. #1
    New to the CF scene
    Join Date
    Nov 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    header problem

    http://www.jay.destined.org/lay.php

    here is my header:

    <body background="background.png">
    <body>
    <title>______________GHOSTIE`</title>
    <Link rel="stylesheet" type="text/css" href="style.css">
    <div id="container">

    <div id="banner">
    <img src="banner.png">
    </div>

    <center>
    <div class=topbg>
    <div class="topmenu">
    <a href=/link>BLOG</a>
    <a href=/link>SITE</a>
    <a href=/link>CONTENT</a>
    <a href=/link>LINKS</a>
    </div></div></center>

    <div id="sidebar">
    <h2>ohhh, girllll</h2><br>
    <img src="http://i34.tinypic.com/332pksz.png" align="left"> info goes here la la la
    <br/><br />

    <br />
    </div>

    <div id="content">
    for some reason my container (white space) isn't showing up. how can i fix this?

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,994
    Thanks
    4
    Thanked 2,662 Times in 2,631 Posts
    This isn't a PHP issue, its an HTML issue.
    Whitespace is ignored. If you want to keep it you can either mark it up as a preformatted text (<pre> tag), or replace with &nbsp;, though I'd try to avoid using non-breaking space whenever possible.

    Since you're containing an image, you'd be better off styling the container css to include a padding of 1em in size for at least the top and bottom of the div. Another option is to also set you're banner as a background image and use a margin.

    One of our client side guys could give you some more options or better advice I'm sure. Moving from PHP to HTML.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 
    Been gone for a few months, and haven't programmed in that long of a time. Meh, I'll wing it ;)

  • #3
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,738
    Thanks
    22
    Thanked 1,836 Times in 1,820 Posts
    Hello jesseraps,
    You need to clear your floats.

    Add this bit in red -
    Code:
    #container {
    width: 668px;
    margin: 0px auto;
    text-align:justify;
    padding:2px;
    background-color: #ffffff; 
    border: 2px solid #ffffff;
    overflow: auto;
    }
    This site explains how that works.
    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

  • #4
    New to the CF scene
    Join Date
    Nov 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thank you so much excavator !

  • #5
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,738
    Thanks
    22
    Thanked 1,836 Times in 1,820 Posts
    It's getting scrollbars in IE8 now. Both vertical and horizontal.
    Try making these changes now, highlighted in red -
    Code:
    #container {
    width: 668px;
    margin: 0px auto;
    text-align:justify;
    padding:2px;
    background-color: #ffffff; 
    border: 2px solid #ffffff;
    overflow: auto;
    }
    #banner {
    width: auto;
    border-bottom: 0px solid #ffffff;
    }
    #content {
    margin: 0 0 0 178px;
    padding: 0 0 0 10px;
    }
    #sidebar {
    background : transparent;
    float : left;
    width : 178px;
    padding:0px;
    }
    You should run that through the validator ... There is a lot there that can be fixed. Check out the links about validation in my sig below, also the link about DocTypes.


    ...
    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


  •  

    Posting Permissions

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