views:

53

answers:

1

Hello, I am sort of new to the whole html and css scene! All I really want to do is have a background, the content placer in the middle, and a header. An example would be this:

http://img46.imageshack.us/img46/3751/38244782.png

Would someone please help me do something really simple like this? Thanks

+3  A: 

Here it is

<!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 id="headElement">
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title></title>
    </head>

    <body>
    <div id="marginWrapper">
           <!-- Header -->
           <div id="pageHeader">Header</div>
           <!-- Body -->
           <div id="pageBody">
              <asp:ContentPlaceHolder ID="PageContent" runat="server" />
           </div>
    </div>
    </body>
</html>

then use this as CSS

html, body
{
    height: 100%; 
    width: 100%; 
    padding: 0; 
    margin: 0; 
}

body 
{
    background: #F4F4F4 url('/_assets/images/backgr_grad.png') repeat-x 0 0;
    color: #284E98;
    font-family: Verdana, Arial, sans-serif;
    font-size: 11px;
}

#marginWrapper 
{
   width: 950px;
   height: 100%;
   margin: 0 auto;
   z-index: 1;
}


#pageHeader
{
    background: #ffffff;
    min-height: 76px;
    max-height: 76px;
    z-index: 1;
}

#pageBody
{
    background: #ffffff;
    z-index: 1;
}
Lorenzo