Grow your CSS skills. Land your dream job.

[Solved] Div Not Displaying

  • # October 10, 2009 at 3:37 am

    I have an interesting issue. I have a div that I’ve defined to be a set height and width that doesn’t display at all. My header, which the CSS for was almost identical has no issue. For some reason, my column div only displays when there’s content in it, and then it only displays around that content. I’m using firefox as my dev browser. I haven’t tested it in anything else. I searched through the forums a little, and wasn’t able to find anything quite like this. On the other hand, it’s pretty hard to formulate a query for a problem like this.

    Here’s My CSS. The div in question is the one labeled columbn.
    @charset "utf-8";
    /* CSS Document */

    /*Wrapper and general divs*/
    #wrapper {
    margin: 0 auto;
    width: 1088px;
    }
    body {
    background-image: url(images/bodybg.png);
    background-repeat: repeat-x;
    }
    /*header*/
    #headerbg {
    background-image: url(images/BannerBack.png);
    height: 188px;
    width: 1088 px;
    }

    /*right column*/
    #column {
    background-image: url(images/right-x.png);
    height: 600 px;
    width: 600 px;
    position: relative;
    }

    Here’s my HTML
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
    <html xmlns="http://www.w3.org/1999/xhtml"&gt;
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <link rel="StyleSheet" href="default.css" media="screen" />
    </head>

    <body>
    <div id="wrapper">
    <div id="headerbg">
    <img src="images/logo.png" style="float: left; margin-left: 20 px;"/>
    </div>
    <div id="column">
    </div>
    </div>
    </body>
    </html>

    Any responses would be greatly appreciated.

    # October 10, 2009 at 1:26 pm

    the problem is that you have a space between 600 and px. You have this

    600 px

    needs to be this

    600px

    # October 10, 2009 at 1:34 pm

    Lol wow. Ok, thanks so much, that worked perfectly. God I feel stupid.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".