Jeg er ved at lave ny side til SFU Odense, men som så mange gange før, vises min side ikke ordentligt i Internet Explore. Den fungerer fint i Firefox og Opera, men kan I ikke hjælpe mig med at optimere koden lidt, så de fordømte IE-brugere også kan nyde synet? - På forhånd mange, mange tak
Her er mit CSS-stylesheet:
body {
background-color: white;
background-image: url("../bg.png");
margin: 0px 0px 0px 0px;
padding: 0px 0px 0px 0px;
font: 14px arial, sanf-serif;
}
#banner {
background-color: #EAE9E9;
border: 1px solid black;
margin: 10px 10px 10px 10px;
padding: 1px 1px 1px 1px;
font: 20px arial, sanf-serif;
}
#leftcol {
width: 150px;
float: left;
}
.leftbox {
width: 150px;
float: left;
background: #EAE9E9;
border: 1px solid black;
margin: 0px 10px 10px 10px;
padding: 1px 1px 1px 1px;
}
#content {
background: #EAE9E9;
border: 1px solid black;
margin: 10px 10px 10px 175px;
padding: 1px 1px 1px 1px;
}
#image {
float: left;
background-color: #C00505;
margin: 0px 0px 0px 0px;
padding: 2px 2px 2px 2px;
}
h1 {
color: white;
background-color: #c00505;
font: 20px arial, sanf-serif;
margin: 0px 0px 0px 0px;
padding: 0px 0px 0px 20px;
}
h2 {
color: white;
background-color: #c00505;
font: 14px arial, sanf-serif;
margin: 0px 0px 0px 0px;
padding: 1px 1px 1px 1px;
}
h3 {
color: black;
background-color: #D0D0D0;
border-top: 1px solid gray;
border-bottom: 1px solid gray;
font: 12px arial, sanf-serif;
margin: 0px 0px 0px 0px;
padding: 1px 1px 1px 1px;
}
menu {
color: black;
background-color: #EAE9E9;
font: 14px arial, sanf-serif;
margin: 0px 0px 0px 0px;
padding: 0px 0px 2px 12px;
}
menu:hover {
color: black;
background-color: white;
font: 14px arial, sanf-serif;
margin: 0px 0px 0px 0px;
padding: 0px 0px 2px 12px;
}
strong {
font: 16px arial, sanf-serif;
text-decoration: underline;
}
p {
color: #3B3B3B;
margin: 0px 0px 0px 0px;
text-indent: 15px;
}
admin {
color: white;
background-color: #c00505;
margin: 0px 0px 0px 0px;
padding: 0px 0px 0px 0px;
}
li {
margin: 0px 0px 0px 0px;
padding: 0px 0px 0px 0px;
}
hr {
border: 1px solid gray;
}
a:link {
color: black;
text-decoration: underline;
}
a:hover {
color: #c00505;
text-decoration: underline;
}
a:visited {
color: black;
text-decoration: underline;
}
table {
border: 1px solid gray;
margin: 5px 5px 5px 5px;
padding: 0px 0px 0px 0px;
}
input {
border: 1px solid black;
background-color: white;
margin: 1px 1px 1px 1px;
}
textarea {
border: 1px solid black;
background-color: white;
margin: 1px 1px 1px 1px;
}
Og her er min index.
<!doctype HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>
<?php
echo $title_normal;
?>
</title>
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Cache-Control" content="no-store, no-cache" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<style type="text/css" media="screen">@import url(style/style.css);</style>
</head>
<body>
<div id="banner">
<h1><img src="sfu.png"></h1>
</div>
<div id="leftcol">
<div class="leftbox">
<h2>Navigation:</h2>
<?php
include("navigation.php");
?>
</div>
<div class="leftbox">
<h2>Eksterne henvisninger:</h2>
<?php
include("links.php");
?>
</div>
<div class="leftbox">
<h2>Tilmeld nyhedsbreve:</h2>
<?php
include("mailinglist.php");
?>
</div>
<div class="leftbox">
<h2>SFU Odense</h2>
Kongensgade 70, st. 5000 Odense C Telefon: 66 14 08 01
</div>
</div>
<div id="content">
<?php
if($_GET["page"] == 2){
echo "<h2>Dokumentation:</h2>";
include("docs.php");
}
elseif($_GET["page"] == 3){
echo "<h2>Kontakt:</h2>";
include("contact.php");
}
elseif($_GET["page"] == 4){
echo "<h2>Om SFU Odense:</h2>";
include("about.php");
}
elseif($_GET["page"] == 5){
echo "<h2>Gæstebog:</h2>";
include("guestbook.php");
}
else{
echo "<h2>Nyheder:</h2>";
include("news.php");
}
?>
</div>
</body>
</html>
Når jeg kører W3C validerings service, siger den at den ikke fandt nogen doctype, men jeg mener at have fundet frem til min nuværende doctype, til PHP.