Stefan Ruettinger
Mitglied
Hallo,
ich habe ein kleines Problem mit Image-Offsets innerhalb von DIVs.
Mein DIV enthält nur ein Bild, aber ich kriege es irgendwie nicht hin, dass es oben ohne Abstand anfängt. Beim IE sieht es aus wie gewünscht, aber Firefox und Opera leider nicht. Dieses kleine Beispiel zeigt das Problem:
http://www.css-erfolg.de/problem/imageproblem.html
Beim Bild oben und unten schaut der blaue Hintergrund durch (sogar in unterschiedlicher Größe), was nicht so sein soll (Fixefox, Opera). Beim IE ist alles ok. Hat jemand eine Idee, was ich tun muss, um keinen Offset zu haben?
Hier der komplette Code:
CODE
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<HTML LANG="de">
<HEAD>
<TITLE>Image Problem</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
</HEAD>
<BODY STYLE="margin: 0px; padding: 0px; border: 0px none; background-color: #00FF00;">
<DIV STYLE="position: absolute; left: 200px; top: 200px; width: 220px;">
<DIV STYLE="position: relative; width: 220px; height: 12px; background-color: #0000FF; overflow: hidden;">
<IMG SRC="oben.gif" ALT="" WIDTH=220 HEIGHT=12><BR>
</DIV>
<DIV STYLE="position: relative; width: 220px; height: 28px; background-image: url('kopf.gif'); background-repeat: repeat-y; overflow: hidden;">&nbsp;</DIV>
<DIV STYLE="position: relative; width: 220px; background-image: url('inhalt.gif'); background-repeat: repeat-y;">&nbsp;</DIV>
<DIV STYLE="position: relative; width: 220px; height: 14px; background-color: #0000FF; overflow: hidden;">
<IMG SRC="unten.gif" ALT="" WIDTH=220 HEIGHT=14><BR>
</DIV>
</DIV>
</BODY>
</HTML>
Vielen Dank und viele Grüße
ich habe ein kleines Problem mit Image-Offsets innerhalb von DIVs.
Mein DIV enthält nur ein Bild, aber ich kriege es irgendwie nicht hin, dass es oben ohne Abstand anfängt. Beim IE sieht es aus wie gewünscht, aber Firefox und Opera leider nicht. Dieses kleine Beispiel zeigt das Problem:
http://www.css-erfolg.de/problem/imageproblem.html
Beim Bild oben und unten schaut der blaue Hintergrund durch (sogar in unterschiedlicher Größe), was nicht so sein soll (Fixefox, Opera). Beim IE ist alles ok. Hat jemand eine Idee, was ich tun muss, um keinen Offset zu haben?
Hier der komplette Code:
CODE
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<HTML LANG="de">
<HEAD>
<TITLE>Image Problem</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
</HEAD>
<BODY STYLE="margin: 0px; padding: 0px; border: 0px none; background-color: #00FF00;">
<DIV STYLE="position: absolute; left: 200px; top: 200px; width: 220px;">
<DIV STYLE="position: relative; width: 220px; height: 12px; background-color: #0000FF; overflow: hidden;">
<IMG SRC="oben.gif" ALT="" WIDTH=220 HEIGHT=12><BR>
</DIV>
<DIV STYLE="position: relative; width: 220px; height: 28px; background-image: url('kopf.gif'); background-repeat: repeat-y; overflow: hidden;">&nbsp;</DIV>
<DIV STYLE="position: relative; width: 220px; background-image: url('inhalt.gif'); background-repeat: repeat-y;">&nbsp;</DIV>
<DIV STYLE="position: relative; width: 220px; height: 14px; background-color: #0000FF; overflow: hidden;">
<IMG SRC="unten.gif" ALT="" WIDTH=220 HEIGHT=14><BR>
</DIV>
</DIV>
</BODY>
</HTML>
Vielen Dank und viele Grüße