Hi, dies ist meine erste Homepage mit PHP/CSS, ich hoffe ihr könnt mir helfen. Im Firefox wird alles richtig angezeigt, aber der Internet Explorer zeigt den Content-Container unter der Navigationsleiste an... Ich poste mal die CSS-Datei und die Hauptseite (die Homepage ist noch nicht online).
// Edit: Zum einen hatte ich vergessen den Doctype anzugeben, zum anderen hab ich mit
ein extra Stylesheet für den IE eingebunden. Jetzt hab ich eine Darstellung mit der ich leben kann.
PHP:
<html>
<head>
<meta http-equiv="content-type" content="text/html" charset=ISO-8859-1">
<meta name="keywords" lang="fr" content="">
<title></title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div id="sitebox">
<div id="header">
</div>
<ul id="navigation">
<li><a href="index.php">Accueil</a></li>
<li><a href="index.php?page=profil">Mon profil</a></li>
<li><a href="index.php?page=approche">Approche générale</a></li>
<li><a href="index.php?page=cible">Clientèle cible</a></li>
<li><a href="index.php?page=legislation">Cadre légal</a></li>
<li><a href="index.php?page=contact">Contact</a></li>
</ul>
<div id="content">
<?php
switch ($_GET["page"])
{
case profil : include 'docs/fr/profil.php';
break;
case approche : include 'docs/fr/approche.php';
break;
case cible : include 'docs/fr/cible.php';
break;
case banques : include 'docs/fr/banques.php';
break;
/*case editeurs : include 'docs/fr/editeurs.php';
break;*/
case etablis : include 'docs/fr/etablis.php';
break;
case futurs : include 'docs/fr/futurs.php';
break;
case particuliers :include 'docs/fr/particuliers.php';
break;
case legislation : include 'docs/fr/legislation.php';
break;
case contact : include 'docs/fr/contact.php';
break;
default : include 'docs/fr/accueil.php';
}
?>
</div>
<div id="footer">
<?php
include 'docs/fr/footer.php';
?>
</div>
</div>
</body>
</html>
PHP:
body {
width: 100%;
color: black; background-color: silver;
font-size: 11pt; font-family: Arial,sans-serif;
text-align : center;
}
p {
margin: 0px 0px 1em; padding: 0px;
color:white;
font-size: 11pt; font-family: Arial,sans-serif;
text-align : left;
}
div#sitebox {
width: 660px; min-height : 585px;
height : auto;
margin: 20px auto; padding : 20px;
text-align: center;
background-color: #333;
}
div#header {
margin : 0px 0px 20px; padding : 0px;
border : none;
background: url("images/header.gif") no-repeat;
height : 145px;
}
/*div#header h1{
margin: 0; padding: 0;
/*border: none;
color : white;
text-align: center;
font-size: 12pt;
}*/
ul#navigation {
width: 140px;
margin: 0px; padding: 0px;
float: left;
border: 1px dashed silver;
background-color: #693;/*#69f;*/
font-size: 11pt;
}
ul#navigation li {
margin: 0px; padding: 0px;
list-style: none;
}
ul#navigation a {
padding: 5px 0px;
display: block;
text-decoration:none;
color:white
}
ul#navigation a:hover {
color: #333; background-color: white;
font-weight: bold;
}
/*div#infobox {
width: 140;
margin : 0; padding : 10;
float: right;
border : 1px dashed silver;
background-color : #69f;
}*/
div#content {
width:476px;
min-height : 300px;
height : auto;
margin: 0px 10px 0px 160px; padding: 10px;
border: 1px dashed silver;
background-color: #693;
}
#content h1 {
margin: 0px 0px 1em; padding: 0px;
color:white;
font-size: 12pt; font-family: Arial,sans-serif; font-weight : bold;
text-align : left;
}
#content h2 {
margin: 0px 0px 1em; padding: 0px;
color:white;
font-size: 11pt; font-family: Arial,sans-serif; font-weight : bold;
text-align : left;
}
#content ul {
list-style : inside circle;
color : white;
text-align : left;
}
#content a {
color: white;
text-decoration : underline;
/*background-image : url('images/link.gif');
background-repeat : no-repeat;
padding-left : 18px;*/
}
#content a:hover {
color: #333;
background-color:white;
}
* html div#content {
height: 300px; /* Workaround gegen den 3-Pixel-Bug des Internet Explorer bis Version 6 */
}
div#footer {
margin : 20px 0px 0px; padding : 10px;
border : none;
background-color: #693;
height : 60px;
}
div#footer p{
text-align : center;
font-size : 9pt;
font-family: Arial,sans-serif;
color : white;
}
// Edit: Zum einen hatte ich vergessen den Doctype anzugeben, zum anderen hab ich mit
Code:
<!--[if ie]>
<link rel="stylesheet" type="text/css" href="style_ie.css">
<![endif]-->