FF alles super - IE zeigt nur Hintergrund

Status
Nicht offen für weitere Antworten.

Kipperlenny

Erfahrenes Mitglied
Moin

Also ich glaube im CSS Forum bin ich richtig - aber sicher bin ich mir da nicht.
Im IE 7 wird Nur der Hintergrund (wird über css im body tag eingebunden) angezeigt - sonst nichts, auch nicht wenn ich den body tag gar nicht formatiere.

Hier die index.php:

PHP:
<?php
echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>";
/**
 * @author Lennart Schreiber
 * @copyright 2008
 */

if($_REQUEST['action'] == '')
	$action = 'index';
else
	$action = $_REQUEST['action'];
	
if($_REQUEST['alteaction'] == '')
	$alteaction = 'index';
else
	$alteaction = $_REQUEST['alteaction'];

?>
<!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>Medienproduktion Recherchieren Konzept</title>
<LINK href="./style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="./<?= $action ?>.js" />
</head>
<body>
<div id="book">
<div id="contentlinks">
<? if(file_exists("./".$action."links.inc.php")) include "./".$action."links.inc.php"; ?>
</div>
<div id="contentrechts">
<? if(file_exists("./".$action."rechts.inc.php")) include "./".$action."rechts.inc.php"; ?>
</div>
<div id="pfeillinks">
<a href="./index.php?action=<?= $alteaction ?>"><img src="./pfeillinks.gif" alt="Pfeil links" /></a>
</div>
<div id="pfeilrechts">
<a href="./index.php?action=<?= $neueaction ?>&alteaction=<?= $action ?>"><img src="./pfeilrechts.gif" alt="Pfeil rechts" /></a>
</div>
</div>
</body>
</html>

Und hier die CSS Datei:

HTML:
	body {
		width:99%;
		text-align:center;
		background-image: url(./background.gif);
		z-index: 0;
	}
	
	div#book {
		position: relative;
  		width: 745px;
  		height: 514px;
 		margin:0px auto;
  		background-image: url(./buch1.jpg);
  		z-index: 1;
	}
	
	div#pfeillinks {
		position: relative;
	  	width: 100px;
  		height: 55px;
  		left: 10px;
  		z-index: 2;
  		float: left;
	}
		
	div#pfeilrechts {
		position: relative;
	  	width: 100px;
  		height: 55px;
  		z-index: 2;
  		float: right;
  		right: 10px;
	}
	
	div#contentlinks {
		position: relative;
		width: 250px;
		height: 350px;
		padding: 50px 20px 50px 80px;
		text-align: left;
		float: left;
	}
	
	div#contentrechts {
		position: relative;
		width: 250px;
		height: 350px;
		padding: 50px 80px 50px 15px;
		text-align: left;
		float: right;
	}
	
	div#quelle {
		position: absolute;
		bottom: 0;
	}
	
	a img{
		border: none;
	}

Hier ist das ganze zu finden: http://www.medprod.heerschaft.de.
Kann mir da jemand helfen?

Lenny

PS: w3c Validator sagt folgendes:

Validation Output: 7 Errors

1. Error Line 6, Column 11: there is no attribute "href".

<LINK href="./style.css" rel="stylesheet" type="text/css" />

?

You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.
2. Error Line 6, Column 29: there is no attribute "rel".

<LINK href="./style.css" rel="stylesheet" type="text/css" />

?

You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.
3. Error Line 6, Column 47: there is no attribute "type".

<LINK href="./style.css" rel="stylesheet" type="text/css" />

?

You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.
4. Error Line 6, Column 59: element "LINK" undefined.

<LINK href="./style.css" rel="stylesheet" type="text/css" />

?

You have used the element named above in your document, but the document type you are using does not define an element of that name. This error is often caused by:
* incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Frameset" document type to get the "<frameset>" element),
* by using vendor proprietary extensions such as "<spacer>" or "<marquee>" (this is usually fixed by using CSS to achieve the desired effect instead).
* by using upper-case tags in XHTML (in XHTML attributes and elements must be all lower-case).
5. Warning Line 32, Column 35: cannot generate system identifier for general entity "alteaction".

<a href="./index.php?action=inhalt&alteaction=index"><img src="./pfeilrechts.gif

?

An entity reference was found in the document, but there is no reference by that name defined. Often this is caused by misspelling the reference name, unencoded ampersands, or by leaving off the trailing semicolon (;). The most common cause of this error is unencoded ampersands in URLs as described by the WDG in "Ampersands in URLs".

Entity references start with an ampersand (&) and end with a semicolon (;). If you want to use a literal ampersand in your document you must encode it as "&amp;" (even inside URLs!). Be careful to end entity references with a semicolon or your entity reference may get interpreted in connection with the following text. Also keep in mind that named entity references are case-sensitive; &Aelig; and &aelig; are different characters.

If this error appears in some markup generated by PHP's session handling code, this article has explanations and solutions to your problem.

Note that in most documents, errors related to entity references will trigger up to 5 separate messages from the Validator. Usually these will all disappear when the original problem is fixed.
6. Error Line 32, Column 35: general entity "alteaction" not defined and no default entity.

<a href="./index.php?action=inhalt&alteaction=index"><img src="./pfeilrechts.gif

?

This is usually a cascading error caused by a an undefined entity reference or use of an unencoded ampersand (&) in an URL or body text. See the previous message for further details.
7. Warning Line 32, Column 45: reference not terminated by REFC delimiter.

…"./index.php?action=inhalt&alteaction=index"><img src="./pfeilrechts.gif" alt

?

If you meant to include an entity that starts with "&", then you should terminate it with ";". Another reason for this error message is that you inadvertently created an entity by failing to escape an "&" character just before this text.
8. Warning Line 32, Column 45: reference to external entity in attribute value.

…"./index.php?action=inhalt&alteaction=index"><img src="./pfeilrechts.gif" alt

?

This is generally the sign of an ampersand that was not properly escaped for inclusion in an attribute, in a href for example. You will need to escape all instances of '&' into '&amp;'.
9. Error Line 32, Column 45: reference to entity "alteaction" for which no system identifier could be generated.

…"./index.php?action=inhalt&alteaction=index"><img src="./pfeilrechts.gif" alt

?

This is usually a cascading error caused by a an undefined entity reference or use of an unencoded ampersand (&) in an URL or body text. See the previous message for further details.
10. Info Line 32, Column 34: entity was defined here.

<a href="./index.php?action=inhalt&alteaction=index"><img src="./pfeilrechts.gif

11. Error Line 32, Column 45: XML Parsing Error: EntityRef: expecting ';'.

…"./index.php?action=inhalt&alteaction=index"><img src="./pfeilrechts.gif" alt
 
Hi,

für den IE gehört so gesehen alles nach dem <script>-Tag zum Javascript-Code, da du das Element nicht ordnungsgemäß geschlossen hast.

aus
Code:
<script type="text/javascript" src="./index.js" />
wird
Code:
<script type="text/javascript" src="./index.js"></script>
denn das script-Element zählt nicht zu den inhaltsleeren Tags (Standalone-Tags).
 
Vielen Dank!! Allerdings hat das den Fehlern im W3C Validator noch nicht geholfen.

Und dann habe ich da noch ein Problem, ich schreib es einfach mal hier mit rein, mit diesem Java Script Code:

Code:
function showquelleinfo()
 {
 document.getElementById("quelleinfo").style.visibility = "visible";
 }
function hidequelleinfo()
 {
 document.getElementById("quelleinfo").style.visibility = "hidden";
 }

möchte ich einen Textteil ein bzw. ausblenden. In dem Beispiel im Internet wird das so gemacht:
HTML:
<div style="visibility:hidden;" id="quelleinfo">
<label for="quelleinfo">
Ein Autor ist jemand der etwas tolles geschrieben hat.
</label>
</div>

Allerdings habe ich damit ein Problem wenn ich mehrere solche Sachen an der gleichen Stelle bei unterschiedlichen mouseover haben möchte, weil die Divs dann untereinander platziert werden (obwohl ja nur eins angezeigt wird und die anderen unsichtbar sind). Wie kann ich es erreichen dass die Teile an der gleichen Stelle bei unterschiedlichen mouseover angezeigt werden, verstanden?!
 
Zuletzt bearbeitet:
In XHTML wird alles, auch die Elementnamen (Tags), kleingeschrieben.

Nimm die Box(en) mit einer absoluten Positionierung aus dem Textfluss.
 
Jetzt sind es noch 3 Fehler bei W3C bezüglich des Zusammenbaus von Links mit PHP, aber damit kann ich leben.

Trotzdem hilft das rausnehmen von der einen box "quelle" (einzige absolute) nicht bei meinem zuletzt geschilderten Problem.
 
Ich glaub, du hast mich nicht oder falsch verstanden.

Code:
<div style="visibility:hidden; position:absolute;top:50px;width:250px; background-color: lightblue; border: 1px solid black;" id="quelleinfo">
...
</div>
<div style="visibility:hidden; position:absolute;top:50px;width:250px; background-color: lightblue; border: 1px solid black;" id="verlaginfo">
...
</div>
Außerdem heißt die Methode getElementById("ID-Name"), und nicht getElementByclass("ID-Name").
 
Status
Nicht offen für weitere Antworten.

Neue Beiträge

Zurück