Ben: div-Höhe

Beitrag lesen

Hi Ashura,

Das denke ich nicht. Alle "Elemente" die ich sehen kann, kann man mittels float und margin positionieren.

Naja, möglich ist das wahrscheinlich schon. Aber ist es nicht möglich, mein Problem einfacher zu lösen, als die ganze Struktur nochmal umzustellen?

Meine komplette CSS-Datei sieht bislang so aus:

body
{
  margin: 0;
  background-image:url('../gfx/hinterg.gif');
  font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif;
  font-size: 11px;
}

/*
Style-Angaben fuer die unterschiedlichen <div>'s
*/

#hintergrund
{
  background-image:url('../gfx/weiss.gif');
  background-repeat: repeat-y;
  width: 799px;
  height: 100%;
}

#header
{
  width: 415px;
  height: 516px;
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
}

#rechtsoben
{
  width: 277px;
  height: 385px;
  position: absolute;
  left: 515px;
  top: 0px;
  z-index: 1;
}

#login
{
  position: absolute;
  left: 642px;
  top: 20px;
}

#barcode
{
  position: absolute;
  left: 20px;
  bottom: 20px;
  z-index: 1;
}

#rechtsunten
{

position: absolute;
  left: 545px;
  bottom: 0;
}

#menu
{
  z-index: 2
  width: 300px;
  position: absolute;
  left: 45px;
  top: 425px;
}

#pfad
{
  z-index: 3;
  width: 400px;
  position: absolute;
  left: 230px;
  top: 130px;
  text-align: left;
  color: #C1C2C1;
  font-size: 10px;
}

#content
{
  z-index: 3;
  width: 400px;
  position: relative;
  left: 230px;
  top: 220px;
  text-align: justify;
  height: auto;
}

Und die entsprechende html bzw. php-Datei dann so:

<html>
<head>
<title>bens-homepage.de - v3</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>

<body>
<div id="hintergrund">
     <div id="header"><img src="gfx/logo.gif" alt="bens-homepage" /></div>
     <div id="rechtsoben"><img src="gfx/kabel1.jpg" alt="Kabel" /></div>
        <div id="login">Login<br /></div>
     <div id="menu"><?php include ("menu.php"); ?></div>
        <div id="pfad">Du bist hier:<br /><img src="gfx/bullet_pfad.gif" alt="->" valign="absmiddle" />bens-homepage /
        News</div>
     <div id="content">
         <?php
              if (!isset($_GET['page']))
              {
                include("news.php");
              } else {
                include($_GET['page'].".php");
              }

?>
        </div>
     <div id="barcode"><img src="gfx/barcode.gif" alt="Barcode" /></div>
     <div id="rechtsunten"><img src="gfx/kabel2.jpg" alt="Kabel" /></div>
    </div>
</body>
</html>

---------------------

Da muss es doch auch eine einfachere Lösung geben, oder? Ansonsten muss ich mich natürlich hinsetzen und nochmal von vorne mit float und margin arbeiten, was dann aber auch wieder den box-model-hack wg. des IE implementieren würde, oder?

Gruß
Ben