#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2002
    Location
    Melbourne, Australia
    Posts
    290
    Rep Power
    13

    CSS columns not showing...i think


    Hi all,
    I have the following:
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <style type="text/css">
    <!--
    body, html{
          height:100%;
          text-align:center;
          margin:0px;
          padding:0px;
       }
       #main,#header,#footer,#cleaner{
          margin-left:auto;
          margin-right:auto;
          width:750px;
          text-align:left;
       }
       #main{
        /*this height is for ie only*/
          height:100%;
          min-height:100%;
          margin-bottom:-50px;
       }
      /*ie wont see this, other browsers will*/
       body>div#main{
          height: auto;
       }
       #header, #footer,#cleaner{
          height:50px;
       }
    -->
    </style>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
    <?
    include ('include/head.php');
    ?> 
    </head>
    <body>
    <div id="main">
      <div id="header">
    <?
    include ('include/top_nav.php');
    ?>  
      </div>
    <?
    include ('return_policy.php');
    ?>  
      <div id="cleaner"></div>
    </div>
    <div id="footer">
    <?
    include ('include/footer.php');
    ?> 
    </div>
    </body>
    </html>
    It appears to have two columns either side but i can't add anything to them. Can anyone tell me how i might be to add a background image?
    Cheers,
    camcim
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2004
    Posts
    25
    Rep Power
    0
    Originally Posted by camcim
    Hi all,
    I have the following:
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <style type="text/css">
    <!--
    body, html{
          height:100%;
          text-align:center;
          margin:0px;
          padding:0px;
       }
       #main,#header,#footer,#cleaner{
          margin-left:auto;
          margin-right:auto;
          width:750px;
          text-align:left;
       }
       #main{
        /*this height is for ie only*/
          height:100%;
          min-height:100%;
          margin-bottom:-50px;
       }
      /*ie wont see this, other browsers will*/
       body>div#main{
          height: auto;
       }
       #header, #footer,#cleaner{
          height:50px;
       }
    -->
    </style>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
    <?
    include ('include/head.php');
    ?> 
    </head>
    <body>
    <div id="main">
      <div id="header">
    <?
    include ('include/top_nav.php');
    ?>  
      </div>
    <?
    include ('return_policy.php');
    ?>  
      <div id="cleaner"></div>
    </div>
    <div id="footer">
    <?
    include ('include/footer.php');
    ?> 
    </div>
    </body>
    </html>
    It appears to have two columns either side but i can't add anything to them. Can anyone tell me how i might be to add a background image?
    Cheers,
    camcim
    No. It is not two columns. With your stylesheet above, this:


    Originally Posted by camcim
    Code:
    <div id="main">
    	<div id="header">
    	...
    	</div>
    	<div id="cleaner">
    	...
    	</div>
    </div>
    will render one row with two rows inside. And this:


    Originally Posted by camcim
    Code:
    <div id="footer">
    ...
    </div>
    will render another row.

    So you have two rows with two rows within the first row.
    Last edited by andrin; February 18th, 2004 at 07:40 AM.

IMN logo majestic logo threadwatch logo seochat tools logo