What is the exact css code to put a background behind a centered div tag?

Discussion in 'Scripts' started by pzqwpo, May 14, 2009.

to remove all ads.
  1. pzqwpo

    pzqwpo New Member

    Messages:
    3
    I want to center my website and behind the centered div tag i want to have a plain gray background but i can't seem to get any codes to work.

    Please give me the exact codes and where to put them...i dont know if i should put it in a css or right in the page code.
     
  2. AusQB

    AusQB New Member

    Messages:
    167
    CSS
    Code:
    body {
       background: #666666;
    }
    
    div#wrap {
       height: auto;
       margin: 0 auto;
    }

    HTML
    HTML:
    <body>
    
       <div id="wrap"></div>
    
    </body>
     
  3. Lonny Earl

    Lonny Earl Banned

    Messages:
    41
    I want to center my website and behind the centered div tag i want to have a plain gray background but i can't seem to get any codes to work.

    Please give me the exact codes and where to put them...i dont know if i should put it in a css or right in the page code.
     

Share This Page