treehouse : what would you like to learn today?
Web Design Web Development iOS Development

CSS help

  • I'm just playing about trying to brush up on my CSS and I'm stuck quite early on.


    I'm wanting to have a black outer with a white central column.

    Here's my code so far

    <html>


    <head>
    <link rel=\"stylesheet\" type=\"text/css\" href=\"pmdesign.css\">


    <title>PM Design: A Web Developer and Graphical Designers Page</title>

    </head>

    <body>
    <div id=\"wrap\">

    <div id=\"banner\"><img src=\"images/mylogo.png\"></div>
    <hr>

    <div id=\"content\"><p>This is the site content where all the latest information and things will go.</p></div>

    <div id=\"links\"> <p>This is the links column which will feature all the site links</p></div>

    </div>

    </body>

    </html>


    and


    #wrap {

    width: 800px;
    height:auto;
    margin: 0 auto;
    padding: 0;
    background-color:white;

    }

    body {
    background-color:black;
    }

    #banner {

    width: auto
    height: auto;
    margin:0 auto;
    float: top;

    }

    #links {
    float:right;
    margin: 0px 10px 0 px 0px;
    height: auto;
    width: 30%;

    }

    #content {

    float:left;
    margin: 0px 0px 0px 10px;
    height: auto;
    width: 60%;


    }

    p {

    font-family: Arial;
    font-size:18pt;
    font-color:black;

    }




    but this code seems to make everything but the banner div black.

    Any ideas?
  • I was sure Jonz replied there?
    :S


    But my wrap is set to be a column in the middle of the page which is why it is white?
    My body background is black which I want to be the rest of the page that is not inside the div.


    have I done this completely wrong?
  • You need to clear the floats or the wrapper wouldn't know where to stop. That's why it stopped the only place it knew where (after the image).

    Episode 42 explains it more better:
    http://css-tricks.com/video-screencasts ... creencast/

    Edit: Sorry about that I gave a pretty dumb reply the first them then I realized what you wanted
  • It's alright

    That seems to have worked a treat. Thanks man.
  • lol No probs :D glad its goin good.