Mithwith: <div>-Element über einem Inhalt zentrieren

Hiho,

ich habe das Problem das ich ums verrecken die "blaue" Box nicht zentriert bekomme. Hintergrund der Geschichte ist, das ich die "blaue" Box über den eigendlichen Inhalt "drüberkleben" will. Ich hoffe der Code erklärt alles weitere, wenn nicht, einfach nachfragen.

Mit freundlichem Gruß

Mithwith

  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"  
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">  
  <head>  
    <style type="text/css">  
      <!--  
        body {  
          margin:0px;  
          padding:0px;  
          font-family:Arial, Helvetica, sans-serif;  
          font-style:normal;  
          font-size:8pt;  
          font-weight:normal;  
          text-align:center;  
          background-color:#FFFFFF;  
          color:#000000;  
        }  
  
        #logo {  
          voice-family:"\"}\"";  
          voice-family:inherit;  
          margin:0px auto;  
          position:absolute;  
          z-index:1;  
  
          border:1px solid #0000FF;  
        }  
  
        #logo_content {  
          voice-family:"\"}\"";  
          voice-family:inherit;  
          margin:0px auto;  
          padding:0px;  
          height:220px;  
          width:760px;  
          text-align:left;  
        }  
  
        #head {  
          voice-family:"\"}\"";  
          voice-family:inherit;  
          background:top repeat-x;  
          background-image:url(img/headbk.png);  
          z-index:1;  
        }  
  
        #head_content {  
          voice-family:"\"}\"";  
          voice-family:inherit;  
          margin:0px auto;  
          padding:0px;  
          position:relative;  
          width:760px;  
          text-align:left;  
          border-bottom:4px solid #009999;  
        }  
  
        #head_space {  
          voice-family:"\"}\"";  
          voice-family:inherit;  
          margin:0px;  
          padding:0px;  
          position:relative;  
          height:120px;  
          width:760px;  
          font-family:Verdana,Arial,sans-serif;  
          font-style:normal;  
          font-size:8pt;  
          font-weight:normal;  
          line-height:12px;  
          text-align:right;  
        }  
  
        #head_menu {  
          voice-family:"\"}\"";  
          voice-family:inherit;  
          margin:0px;  
          padding:0px 0px 0px 0px;  
          overflow:hidden;  
          height:20px;  
          width:760px;  
          line-height:20px;  
          background-color:#005555;  
          color:#FFFFFF;  
        }  
      -->  
    </style>  
    <title>Testseite [BB]</title>  
  </head>  
  <body>  
    <div id="logo">  
      <div id="logo_content">  
        <img align="left" src="resx/img/logo.png" />  
      </div>  
    </div>  
    <div id="head">  
      <div id="head_content">  
        <div id="head_space"></div>  
        <div id="head_menu">Link 1 | Link 2 | Link 3 | Link 4</div>  
      </div>  
    </div>  
  </body>  
</html>  

  1. Hallo Mithwith,

    wenn ich das richtig sehe, ist ja nur #logo_content von Bedeutung:

    body {
              margin:0px;
              padding:0px;
              font-family:Arial, Helvetica, sans-serif;
              font-style:normal;
              font-size:8pt;
              font-weight:normal;

    /* text-align:center;*/

    background-color:#FFFFFF;
              color:#000000;
            }

    #logo {
              voice-family:""}"";
              voice-family:inherit;
              margin:0px auto;
              position:absolute;
              z-index:1;

                 width:100%;  
                 text-align:center;
    

    border:1px solid #0000FF;
            }

    #logo_content {
              voice-family:""}"";
              voice-family:inherit;

    display:inline-block;

    margin:0px auto;
              padding:0px;
              height:220px;
              width:760px;
              text-align:left;
            }

    Ist so dann auch IE-6-tauglich.

    Gruß aus Berlin!
    eddi