Layout mit 100% height und width

Status
Nicht offen für weitere Antworten.
Erstens war davon nicht die Rede und zweitens floaten ja auch noch das Menü und der Content.
 
Hi
Ich hab schon wieder ein Problem, und zwar wird es nicht ganz richtig angezeigt.
Be Firefox ist es richtig aber im IE nicht, ich hab nen Screenshot gemacht, mit Sachen die falsch sind.
lg

Code:
HTML:
body {
background-image: url(images/bg.jpg);
font-family: Arial, Helvetica, sans-serif;
}

#header {
width: 780px;
height: 15px;
background-color: #88c3e1;
padding: 10px;
margin: 0 auto;
margin-bottom: 10px;
}

#container {
width: 800px;
margin: 0 auto;

background-color: #ffffff;
}

#menu {
width: 130px;
float: left;
background-color: #ffffff;
padding: 15px;
padding-top: 0px;
}

#content {
width: 600px;
background-color: #e2e2e2;
padding: 15px 10px 15px 10px;
margin: 20px 10px 10px 5px;
float: right;
min-height: 500px;
border: 2px solid black;
}

#footer {
width: 610px;
height: 20px;
background-color: #ffffff;
padding: 5px;
float: right;
}

.menu-bg {
width: 127px;
height: 22px;
background-image: url(images/button.jpg);
padding: 2px;
text-align: center;
}

.menu-bg:hover {
width: 127px;
height: 22px;
background-image: url(images/button2.jpg);
padding: 2px;
text-align: center;
}

.menu {
font-size: 12px;
color: #003366;
font-weight: bold;
text-decoration: none;
}

.menu:hover {
font-size: 12px;
color: #ff8041;
font-weight: bold;
text-decoration: underline;
}

.navi {
font-size: 16px;
color: #a1a1a1;
font-weight: bold;
}

.clear {
clear:both;
}
 

Anhänge

  • ie.jpg
    ie.jpg
    48 KB · Aufrufe: 14
Hi,

und wie lautet das dazugehörige HTML-Markup? Ohne den Quellcode lässt sich das Problem im IE nicht reproduzieren.
 
Code:
<?php 
 include ("checkuser.php");  
 include ("configs/class.inc.php"); 
 ?>
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Unbenanntes Dokument</title>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>

<body>

<div id="header"><?php include("header.php"); ?></div>
<div id="container">
<div id="menu">
<?php include("navi.php"); ?>
</div>
<div id="content">


</div>
<div id="footer" align="center"><?php include("footer.php"); ?></div><div class="clear"></div>
</div>

</body>
</html>
 
Da hab ich mich wohl missverständlich ausgedrückt, denn die Grundstruktur des Dokuments ist mir ja schon bekannt. Ich meine den Teil, der im DIV content ausgegeben wird, denn das ursprünglich verwendete Formular wird wohl auf der "neuen" Seite nicht mehr eingesetzt.
 
Code:
<?php 
ob_start();
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Kundenverwaltung</title>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
</html>
 <?php 
 include ("checkuser.php");  
 include ("configs/class.inc.php"); 
 include ("configs/config.inc.php"); 
 include ("config.inc.php");  
 ?>
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Unbenanntes Dokument</title>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>

<body>

<div id="header"><?php include("header.php"); ?></div>
<div id="container">
<div id="menu">
<?php include("navi.php"); ?>
</div>
<div id="content">

<?php
 
 mysql_connect($host, $user, $pass) or die ("Keine Verbindung zu der Datenbank möglich.");
 mysql_select_db($db);
    
 $userdaten = mysql_fetch_array(mysql_query('SELECT * FROM loginscript WHERE Id='.(int)$_SESSION['user_id']));
 
 echo '
 <table width="600" border="0" align="center" class="table" >
   <tr>
     <td class="table1">ID:</td>
     <td class="table1">'.$userdaten['Id'].'</td>
   </tr>
     <tr>
     <td class="table2">Username:</td>
     <td class="table2">'.$_SESSION["user_username"].'</td>
   </tr>
     <tr>
     <td class="table1">Rang:</td>
     <td class="table1">'.$rang.'</td>
   </tr>
   <tr>
     <td class="table2">Vorname:</td>
     <td class="table2">'.$userdaten['Vorname'].'</td>
   </tr>
   <tr>
     <td class="table1">Nachname:</td>
     <td class="table1">'.$userdaten['Nachname'].'</td>
   </tr>
   <tr>
     <td class="table2">Email Adresse: </td>
     <td class="table2">'.$userdaten['email'].'</td>
   </tr>
   <tr>
     <td class="table1">Letztes Login: </td>
     <td class="table1">'.date('d.m.Y / H:i:s',$userdaten["lastlogin"]).' </td>
   </tr>
     <tr>
     <td class="table2">Letzte IP: </td>
     <td class="table2">'.$userdaten['lastip'].'</td>
   </tr>
 </table>
 '; 
 ob_end_flush();  
 ?> 

</div>
<div id="footer" align="center"><?php include("footer.php"); ?></div><div class="clear"></div>
</div>

</body>
</html>
 
Okay, nächster Versuch: Bitte poste den ausgegebenen Quellcode, also das, was vom PHP-Code erzeugt und in das Dokument, wie z.B. in die Tabelle innerhalb des DIV content geschrieben wird. Denn mit den ganzen PHP-Variablen stellt der IE die Seite bei mir fehlerfrei dar.
 
Aso sry.
Hier nun der Code, ich hoffe es ist endlich das richtige :D
Code:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Kundenverwaltung</title>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
</html>
    <!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Unbenanntes Dokument</title>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>

<body>

<div id="header"><html>
<head>

<SCRIPT>
var loaded = false;
if (document.layers)
  document.write(
'<STYLE>.rewritable { position: absolute; }<\/STYLE>'
  );
function Clock (offsetSec, style) {
  this.id = Clock.cnt;
  Clock.clocks[Clock.cnt++] = this;
  this.offsetSec = offsetSec || 0;
  this.style = style || '';
  this.writeHTML();
  this.startTimer();
}
function Clock_writeHTML () {
  var html = '';
  if (document.layers) {
    html += '<SPAN';
    html += ' ID="Clock' + this.id + '"';
    html += ' CLASS="rewritable"';
    html += '>';
    html += '<SPAN';
    html += this.style ? ' CLASS="' + this.style + '"' : '';
    html += '>';
    html += this.formatTime();
    html += '<\/SPAN>';
    html += '<\/SPAN>';
  }
  else {
    html += '<SPAN';
    html += ' ID="Clock' + this.id + '"';
    html += this.style ? ' CLASS="' + this.style + '"' : '';
    html += '>';
    html += this.formatTime();
    html += '<\/SPAN>';
  }
  document.write(html);
}
Clock.prototype.writeHTML = Clock_writeHTML;
function Clock_formatTime () {
  var time = new Date();
  time.setTime(time.getTime() + this.offsetSec * 1000);
  var hours = time.getHours();
  var minutes = time.getMinutes();
  var seconds = time.getSeconds();
  var html = '';
  html += hours < 10 ? '0' + hours : hours;
  html += ':';
  html += minutes < 10 ? '0' + minutes : minutes;
  html += ':';
  html += seconds < 10 ? '0' + seconds : seconds;
  return html;
}
Clock.prototype.formatTime = Clock_formatTime;
function Clock_startTimer () {
  this.tid = setInterval('Clock.clocks[' + this.id + '].updateTime()', 
1000);
}
Clock.prototype.startTimer = Clock_startTimer;
function Clock_updateTime () {
  if (document.all)
    document.all['Clock' + this.id].innerHTML = this.formatTime();
  else if (document.getElementById)
    document.getElementById('Clock' + this.id).firstChild.nodeValue =
      this.formatTime();
  else if (document.layers && loaded) {
    var l = document['Clock' + this.id];
    if (!l.ol) {
      var ol = l.ol = new Layer(l.clip.width);
      ol.clip.height = l.clip.height;
      ol.left = l.pageX; ol.top = l.pageY;
      ol.visibility = 'show';
      l.visibility = 'hide';
    }
    var ol = l.ol;
    var html = '';
    html += '<SPAN';
    html += this.style ? ' CLASS="' + this.style + '"' : '';
    html += '>';
    html += this.formatTime();
    html += '<\/SPAN>';
    ol.document.open();
    ol.document.write(html);
    ol.document.close();
  }
}
Clock.prototype.updateTime = Clock_updateTime;
Clock.cnt = 0;
Clock.clocks = new Array();
function init () {
  loaded = true;
} 
</SCRIPT>
</HEAD>
<BODY ONLOAD="init()">

Ihre IP-Adresse lautet 80.109.97.178
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Samstag der, 24. Februar 2007 - 

<SCRIPT>
new Clock(0, 'js');
</SCRIPT>


</BODY>
</html>





</div>
<div id="container">
<div id="menu">
&nbsp;<br />
<div class="navi" align="center">Navigation</div>
&nbsp;<br />
<div class="menu-bg"><a href="index.php" class="menu">Home</a></div>

<div class="menu-bg"><a href="#" class="menu">Kunden eintragen</a></div>
<div class="menu-bg"><a href="#" class="menu">Kunden suchen</a></div>
<div class="menu-bg"><a href="#" class="menu">Vertrag eingeben</a></div>
<div class="menu-bg"><a href="#" class="menu">Vertrag suchen</a></div>
<div class="menu-bg"><a href="account.php" class="menu">Account Infos</a></div>
&nbsp;<br />
--------------------------<br />
<div class="menu-bg"><a href="logout.php" class="menu">Logout</a></div>
--------------------------<br />

&nbsp;<br />
User: &nbsp;<b><br />admin</b><br /><br />
Rang: <b><br />Administrator</b><br />
&nbsp;<br /></div>
<div id="content">


 <table width="600" border="0" align="center" class="table" >
   <tr>
     <td class="table1">ID:</td>

     <td class="table1">1</td>
   </tr>
     <tr>
     <td class="table2">Username:</td>
     <td class="table2">admin</td>
   </tr>
     <tr>

     <td class="table1">Rang:</td>
     <td class="table1">Administrator</td>
   </tr>
   <tr>
     <td class="table2">Vorname:</td>
     <td class="table2">Alexander</td>
   </tr>

   <tr>
     <td class="table1">Nachname:</td>
     <td class="table1">Bischof</td>
   </tr>
   <tr>
     <td class="table2">Email Adresse: </td>
     <td class="table2">support@linux-user.at</td>

   </tr>
   <tr>
     <td class="table1">Letztes Login: </td>
     <td class="table1">24.02.2007 / 11:19:28 </td>
   </tr>
     <tr>
     <td class="table2">Letzte IP: </td>

     <td class="table2">80.109.97.178</td>
   </tr>
 </table>
  

</div>
<div id="footer" align="center">DVM Kundenverwaltung &copy; by <a href="mailto:webdesign@pcmasters.at" class="menu">Alexander Bischof</a></div><div class="clear"></div>
</div>

</body>

</html>
 
Wie es scheint, liegt es daran, dass du im DIV header via PHP ein weiteres Dokumentgrundgerüst incl. Dokumentkörper includest.

Mit diesem "bereinigten" Quellcode zeigt der IE die Seite fehlerfrei an:

Code:
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Unbenanntes Dokument</title>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>

<div id="header">

<SCRIPT>
var loaded = false;
if (document.layers)
  document.write(
'<STYLE>.rewritable { position: absolute; }<\/STYLE>'
  );
function Clock (offsetSec, style) {
  this.id = Clock.cnt;
  Clock.clocks[Clock.cnt++] = this;
  this.offsetSec = offsetSec || 0;
  this.style = style || '';
  this.writeHTML();
  this.startTimer();
}
function Clock_writeHTML () {
  var html = '';
  if (document.layers) {
    html += '<SPAN';
    html += ' ID="Clock' + this.id + '"';
    html += ' CLASS="rewritable"';
    html += '>';
    html += '<SPAN';
    html += this.style ? ' CLASS="' + this.style + '"' : '';
    html += '>';
    html += this.formatTime();
    html += '<\/SPAN>';
    html += '<\/SPAN>';
  }
  else {
    html += '<SPAN';
    html += ' ID="Clock' + this.id + '"';
    html += this.style ? ' CLASS="' + this.style + '"' : '';
    html += '>';
    html += this.formatTime();
    html += '<\/SPAN>';
  }
  document.write(html);
}
Clock.prototype.writeHTML = Clock_writeHTML;
function Clock_formatTime () {
  var time = new Date();
  time.setTime(time.getTime() + this.offsetSec * 1000);
  var hours = time.getHours();
  var minutes = time.getMinutes();
  var seconds = time.getSeconds();
  var html = '';
  html += hours < 10 ? '0' + hours : hours;
  html += ':';
  html += minutes < 10 ? '0' + minutes : minutes;
  html += ':';
  html += seconds < 10 ? '0' + seconds : seconds;
  return html;
}
Clock.prototype.formatTime = Clock_formatTime;
function Clock_startTimer () {
  this.tid = setInterval('Clock.clocks[' + this.id + '].updateTime()',
1000);
}
Clock.prototype.startTimer = Clock_startTimer;
function Clock_updateTime () {
  if (document.all)
    document.all['Clock' + this.id].innerHTML = this.formatTime();
  else if (document.getElementById)
    document.getElementById('Clock' + this.id).firstChild.nodeValue =
      this.formatTime();
  else if (document.layers && loaded) {
    var l = document['Clock' + this.id];
    if (!l.ol) {
      var ol = l.ol = new Layer(l.clip.width);
      ol.clip.height = l.clip.height;
      ol.left = l.pageX; ol.top = l.pageY;
      ol.visibility = 'show';
      l.visibility = 'hide';
    }
    var ol = l.ol;
    var html = '';
    html += '<SPAN';
    html += this.style ? ' CLASS="' + this.style + '"' : '';
    html += '>';
    html += this.formatTime();
    html += '<\/SPAN>';
    ol.document.open();
    ol.document.write(html);
    ol.document.close();
  }
}
Clock.prototype.updateTime = Clock_updateTime;
Clock.cnt = 0;
Clock.clocks = new Array();
function init () {
  loaded = true;
}
</SCRIPT>


Ihre IP-Adresse lautet 80.109.97.178
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Samstag der, 24. Februar 2007 -

<SCRIPT>
new Clock(0, 'js');
</SCRIPT>
</div>
<div id="container">
<div id="menu">
&nbsp;<br />
<div class="navi" align="center">Navigation</div>
&nbsp;<br />
<div class="menu-bg"><a href="index.php" class="menu">Home</a></div>

<div class="menu-bg"><a href="#" class="menu">Kunden eintragen</a></div>
<div class="menu-bg"><a href="#" class="menu">Kunden suchen</a></div>
<div class="menu-bg"><a href="#" class="menu">Vertrag eingeben</a></div>
<div class="menu-bg"><a href="#" class="menu">Vertrag suchen</a></div>
<div class="menu-bg"><a href="account.php" class="menu">Account Infos</a></div>
&nbsp;<br />
--------------------------<br />
<div class="menu-bg"><a href="logout.php" class="menu">Logout</a></div>
--------------------------<br />

&nbsp;<br />
User: &nbsp;<b><br />admin</b><br /><br />
Rang: <b><br />Administrator</b><br />
&nbsp;<br /></div>
<div id="content">
 <table width="600" border="0" align="center" class="table" >
   <tr>
     <td class="table1">ID:</td>

     <td class="table1">1</td>
   </tr>
     <tr>
     <td class="table2">Username:</td>
     <td class="table2">admin</td>
   </tr>
     <tr>

     <td class="table1">Rang:</td>
     <td class="table1">Administrator</td>
   </tr>
   <tr>
     <td class="table2">Vorname:</td>
     <td class="table2">Alexander</td>
   </tr>

   <tr>
     <td class="table1">Nachname:</td>
     <td class="table1">Bischof</td>
   </tr>
   <tr>
     <td class="table2">Email Adresse: </td>
     <td class="table2">support@linux-user.at</td>

   </tr>
   <tr>
     <td class="table1">Letztes Login: </td>
     <td class="table1">24.02.2007 / 11:19:28 </td>
   </tr>
     <tr>
     <td class="table2">Letzte IP: </td>

     <td class="table2">80.109.97.178</td>
   </tr>
 </table>
</div>
<div id="footer" align="center">DVM Kundenverwaltung &copy; by <a href="mailto:webdesign@pcmasters.at" class="menu">Alexander Bischof</a></div><div class="clear"></div>
</div>

</body>
</html>
 
Status
Nicht offen für weitere Antworten.

Neue Beiträge

Zurück