Grafik fest platzieren

Status
Nicht offen für weitere Antworten.
Danke.
habs nun mal so Probiert.
Doch der IE reagiert nicht.

Ne Idee? Vielleicht was am Code falsch?

PHP:
<!--[if lte IE 7]>

#fixed_table{
 position: absolute;
 right: 0;
 bottom: 0;

}

#fixed_table[id] {
position: fixed;
right: 0;
bottom: 0;
}

<![endif]-->


#fixed_table{
 position: fixed;
 right: 0;
 bottom: 0;

}
 
Hat dir denn das empfohlene Beispiel nicht weitergeholfen?

Noch eine grundsätzliche Anmerkung zum "Condtional Comment" (<!--[if IE]> ... <![endif]--> ): Dieser wird nicht innerhalb eines Stylesheets / einer CSS-Datei, sondern im HTML-Quelltext nach dem "normalen" Stylesheet aufgerufen.
 
Problem ist ich versteh fast kein English und weis so nicht wie ich das auf mein aktuelles Beispiel anwenden soll ;-(

Ich schaus mir aber solang an bis ichs kapier ;-)

Gruss

EDIT:

Also so klappts nicht, aber ich hab kein Plan ob das korrekt ist.
Befindet sich inerhalb vom <HEAD>.

<style type="text/css">
#fixed_table{
position: fixed;
left: 20;
top: 120;

}
</style>
<!--[if lte IE 6]>
<style type="text/css">
/*<![CDATA[*/
html {overflow-x:auto; overflow-y:hidden;}
/*]]>*/
</style>
<![endif]-->
 
Zuletzt bearbeitet:
Dann konzentrier dich mal auf diesen "abgespeckten" Quellcode ;)

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="Author" content="Stu Nicholls" />
<title> stu nicholls | CSS PLaY | emulating position fixed for Internet Explorer </title>
<style type="text/css">
html {background:rgb(123,187,221);}
body {margin:0; padding:0 10px 0 10px; border:0; height:100%; overflow-y:auto; background:rgb(123,187,221);}
body {font-family: georgia, serif; font-size:16px;}

#menu {display:block; top:20px; left:20px; width:130px; position:fixed; border:1px solid #888; padding:10px; text-align:center; font-weight:bold; color:#fff; background:url(grid2.gif);}
* html #menu {position:absolute;}
</style>
<!--[if lte IE 6]>
   <style type="text/css">
   /*<![CDATA[*/
html {overflow-x:auto; overflow-y:hidden;}
   /*]]>*/
   </style>
<![endif]-->

</head>
<body>

<p>Hier folgt der Inhalt ...</p>
<p>Hier folgt der Inhalt ...</p>
<p>Hier folgt der Inhalt ...</p>
<p>Hier folgt der Inhalt ...</p>
<p>Hier folgt der Inhalt ...</p>
<p>Hier folgt der Inhalt ...</p>
<p>Hier folgt der Inhalt ...</p>
<p>Hier folgt der Inhalt ...</p>
<p>Hier folgt der Inhalt ...</p>
<p>Hier folgt der Inhalt ...</p>
<p>Hier folgt der Inhalt ...</p>
<p>Hier folgt der Inhalt ...</p>
<p>Hier folgt der Inhalt ...</p>
<p>Hier folgt der Inhalt ...</p>
<p>Hier folgt der Inhalt ...</p>
<p>Hier folgt der Inhalt ...</p>
<p>Hier folgt der Inhalt ...</p>
<p>Hier folgt der Inhalt ...</p>
<p>Hier folgt der Inhalt ...</p>
<p>Hier folgt der Inhalt ...</p>
<p>Hier folgt der Inhalt ...</p>
<p>Hier folgt der Inhalt ...</p>
<p>Hier folgt der Inhalt ...</p>
<p>Hier folgt der Inhalt ...</p>
<p>Hier folgt der Inhalt ...</p>
<p>Hier folgt der Inhalt ...</p>
<p>Hier folgt der Inhalt ...</p>
<p>Hier folgt der Inhalt ...</p>
<p>Hier folgt der Inhalt ...</p>
<p>Hier folgt der Inhalt ...</p>
<p>Hier folgt der Inhalt ...</p>
<p>Hier folgt der Inhalt ...</p>
<p>Hier folgt der Inhalt ...</p>
<p>Hier folgt der Inhalt ...</p>
<p>Hier folgt der Inhalt ...</p>
<p>Hier folgt der Inhalt ...</p>
<p>Hier folgt der Inhalt ...</p>
<p>Hier folgt der Inhalt ...</p>
<p>Hier folgt der Inhalt ...</p>
<p>Hier folgt der Inhalt ...</p>
<p>Hier folgt der Inhalt ...</p>
<p>Hier folgt der Inhalt ...</p>

<div id="menu">
DUMMY MENU
<a href="#" title="Dummy menu item">Mozilla</a>
<a href="#" title="Dummy menu item">Opera</a>
<a href="#" title="Dummy menu item">Netscape</a>
<a href="#bites" title="Dummy menu item">Firefox</a>
<a href="#" title="Dummy menu item">IE6</a>
<a href="#" title="Dummy menu item">Windows</a>
<a href="#" title="Dummy menu item">Style</a>
<a href="#" title="Dummy menu item">CSS</a>
<a href="http://www.cssplay.co.uk/comments/comments.php?comment_id=position fixed" title="Your comments">Comments</a>
</div>

</body>
</html>
 
Hab ich schon.
Mi keinem Ergebnis.
Ich weis ja leider nicht mal welche Faktoren dafür verantwortlich sind das es im IE Funktioniert.

Wenn ich das wenigstens wüsste dann könnte ich das schon hinbekommen.

Das einzigste was ich herausbekommen habe ist das es was mit:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

zu tun haben muss.

Denn wenn ich da wie bei mir:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

eingebe.
Dann funktioniert es auch nimma mit dem Code.

Trotzdem danke für die Mühe.

Gruss
 
Betrachten wir mal diese beiden Selektoren aus Stu Nicholls' Beispiel:

Code:
#menu {display:block; top:20px; left:20px; width:130px; position:fixed; border:1px solid #888; padding:10px; text-align:center; font-weight:bold; color:#fff; background:url(grid2.gif);}
* html #menu {position:absolute;}
Mit Hilfe des Star-HTML-Hacks wird die Box #menu für den IE (<7) absolut positioniert.
 
Jop Danke Dir.
Funktioniert auch so ;-)

Allerdings nur wenn ich wie ich schon gesagt habe:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">


Anstatt:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

Benutze.

Wenn ich das mache dann ist aber mein komplettes Design futsch.

Ach Mannoo! ;-(
 
Dass bei der Umstellung vom "Quirksmode" auf den "Standardsmode" dein Design flöten geht, liegt vermutlich daran, dass du, wie schon bei den Positionsangaben (left,top), für die Breiten- und/oder Höhenangaben keine Einheit (px) angegeben haben wirst.
 
Status
Nicht offen für weitere Antworten.
Zurück