<table ... background="image.JPG"> in welchen Browsern funzt es?

mactrisha

mactrisha

Aktives Mitglied
Thread Starter
Dabei seit
27.11.2003
Beiträge
744
Reaktionspunkte
17
Hi all,

ich möchte ein 580x437 großes Bild als Hintergrundbild für eine Tabelle, die genau die gleichen Maße wie das Bild hat definieren. Sämtliche Mac-Browser können das in OSX wie in Classic richtig darstellen, nur nicht Netscape 4.5 und 4.7, da geht das einfach nicht.

Jetzt meine Frage, könnt ihr mir Feedback geben, auf welchen Browsern eines PC soetwas geht oder nicht geht? Ich habe auf die schnelle keine Möglichkeit, das in einem PC zu überprüfen. Oder gibt es eine andere Lösung dafür?

Das Hintergrundbild als bg image in den Hintergrund der Seite zu geben bringt in mehreren Browsern das Problem, dass das Bild und die gleichgroße Tabelle nicht exakt übereinander schweben, doch genau das bräuchte ich.

Salü,
mactrisha.

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

<html>

<head>
<title>hintergrundbild von einer tabelle</title>
</head>

<body leftmargin="0" marginheight="0" marginwidth="0" topmargin="0">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
<tr align="center" valign="middle">
<td align="center" valign="middle">
<table width=580 border=0 cellpadding=0 cellspacing=0 background="IMG_0610.JPG">
<tr>
<td width=36 nowrap></td>
<td width=32 nowrap></td>
<td width=15 nowrap></td>
<td width=49 nowrap></td>
<td width=14 nowrap></td>
<td width=30 nowrap></td>
<td width=13 nowrap></td>
<td width=38 nowrap></td>
<td width=14 nowrap></td>
<td width=33 nowrap></td>
<td width=17 nowrap></td>
<td width=254 nowrap></td>
<td width=35 nowrap></td>
</tr>
<tr>
<td width=291 height=20 colspan=11 nowrap></td>
<td width=289 height=20 colspan=2 nowrap></td>
</tr>
<tr>
<td width=580 height=14 colspan=13 nowrap></td>
</tr>
<tr>
<td width=36 height=14 nowrap></td>
<td>text</td>
<td width=15 height=14 nowrap></td>
<td>text</td>
<td width=14 height=14 nowrap></td>
<td>text</td>
<td width=13 height=14 nowrap></td>
<td>text</td>
<td width=14 height=14 nowrap></td>
<td>text</td>
<td width=306 height=14 colspan=3 nowrap></td>
</tr>
<tr>
<td width=580 height=143 colspan=13 nowrap></td>
</tr>
<tr height="32">
<td colspan=13 height="32"></td>
</tr>
<tr>
<td width=580 height=170 colspan=13 nowrap></td>
</tr>
<tr>
<td width=545 height=44 colspan=12 nowrap></td>
<td></td>
</tr>
</table>
</td>
</tr>
</table>
<p></p>
</body>

</html>


Übrigens geht es mit CSS auch nicht:

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

<html>

<head>
<title>hintergrund einer tabelle per CSS class</title>
<style type="text/css" media="screen"><!--
body { background: white no-repeat center }
.class { background: url(IMG_0610.JPG) no-repeat }
--></style>
</head>

<body leftmargin="0" marginheight="0" marginwidth="0" topmargin="0">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
<tr align="center" valign="middle">
<td align="center" valign="middle">
<table class="class" width=580 border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=36 nowrap></td>
<td width=32 nowrap></td>
<td width=15 nowrap></td>
<td width=49 nowrap></td>
<td width=14 nowrap></td>
<td width=30 nowrap></td>
<td width=13 nowrap></td>
<td width=38 nowrap></td>
<td width=14 nowrap></td>
<td width=33 nowrap></td>
<td width=17 nowrap></td>
<td width=254 nowrap></td>
<td width=35 nowrap></td>
</tr>
<tr>
<td width=291 height=20 colspan=11 nowrap></td>
<td width=289 height=20 colspan=2 nowrap></td>
</tr>
<tr>
<td width=580 height=14 colspan=13 nowrap></td>
</tr>
<tr>
<td width=36 height=14 nowrap></td>
<td>text</td>
<td width=15 height=14 nowrap></td>
<td>text</td>
<td width=14 height=14 nowrap></td>
<td>text</td>
<td width=13 height=14 nowrap></td>
<td>text</td>
<td width=14 height=14 nowrap></td>
<td>text</td>
<td width=306 height=14 colspan=3 nowrap></td>
</tr>
<tr>
<td width=580 height=143 colspan=13 nowrap></td>
</tr>
<tr height="32">
<td colspan=13 height="32"></td>
</tr>
<tr>
<td width=580 height=170 colspan=13 nowrap></td>
</tr>
<tr>
<td width=545 height=44 colspan=12 nowrap></td>
<td></td>
</tr>
</table>
</td>
</tr>
</table>
<p></p>
</body>

</html>


Und wenn man es so macht, dann sitzen Tabelle und Bild in den verschiedenen Browsern nicht exakt übereinander:

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

<html>

<head>
<title>hintergrundbild im body per css</title>
<style type="text/css" media="screen"><!--
body { background: white url(IMG_0610.JPG) no-repeat center }
--></style>
</head>

<body leftmargin="0" marginheight="0" marginwidth="0" topmargin="0">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
<tr align="center" valign="middle">
<td align="center" valign="middle">
<table width=580 border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=36 nowrap></td>
<td width=32 nowrap></td>
<td width=15 nowrap></td>
<td width=49 nowrap></td>
<td width=14 nowrap></td>
<td width=30 nowrap></td>
<td width=13 nowrap></td>
<td width=38 nowrap></td>
<td width=14 nowrap></td>
<td width=33 nowrap></td>
<td width=17 nowrap></td>
<td width=254 nowrap></td>
<td width=35 nowrap></td>
</tr>
<tr>
<td width=291 height=20 colspan=11 nowrap></td>
<td width=289 height=20 colspan=2 nowrap></td>
</tr>
<tr>
<td width=580 height=14 colspan=13 nowrap></td>
</tr>
<tr>
<td width=36 height=14 nowrap></td>
<td>text</td>
<td width=15 height=14 nowrap></td>
<td>text</td>
<td width=14 height=14 nowrap></td>
<td>text</td>
<td width=13 height=14 nowrap></td>
<td>text</td>
<td width=14 height=14 nowrap></td>
<td>text</td>
<td width=306 height=14 colspan=3 nowrap></td>
</tr>
<tr>
<td width=580 height=143 colspan=13 nowrap></td>
</tr>
<tr height="32">
<td colspan=13 height="32"></td>
</tr>
<tr>
<td width=580 height=170 colspan=13 nowrap></td>
</tr>
<tr>
<td width=545 height=44 colspan=12 nowrap></td>
<td></td>
</tr>
</table>
</td>
</tr>
</table>
<p></p>
</body>

</html>
 

Anhänge

  • img_0610.jpg
    img_0610.jpg
    60,9 KB · Aufrufe: 78
Tut mir leid, aber so tue ich mir den Code nicht an ;)
 
css - Version funktioniert unter XP und IE

Gruß,
Erika
 
Guten Tag.

Was funktionieren sollte, ist folgendes.
PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
 <title>hintergrundbild von einer tabelle</title>
</head>

<body leftmargin="0" marginheight="0" marginwidth="0" topmargin="0">
  <table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
    <tr align="center" valign="middle">
      <td align="center" valign="middle">
        <table width=580 border=0 cellpadding=0 cellspacing=0 background="IMG_0610.JPG">
          <tr>
            <td>
              <table width=580 border=0 cellpadding=0 cellspacing=0>
                <tr>
                  <td width=36 nowrap></td>
                  <td width=32 nowrap></td>
                  <td width=15 nowrap></td>
                  <td width=49 nowrap></td>
                  <td width=14 nowrap></td>
                  <td width=30 nowrap></td>
                  <td width=13 nowrap></td>
                  <td width=38 nowrap></td>
                  <td width=14 nowrap></td>
                  <td width=33 nowrap></td>
                  <td width=17 nowrap></td>
                  <td width=254 nowrap></td>
                  <td width=35 nowrap></td>
                </tr>
                <tr>
                  <td width=291 height=20 colspan=11 nowrap></td>
                  <td width=289 height=20 colspan=2 nowrap></td>
                </tr>
                <tr>
                  <td width=580 height=14 colspan=13 nowrap></td>
                </tr>
                <tr>
                  <td width=36 height=14 nowrap></td>
                  <td>text</td>
                  <td width=15 height=14 nowrap></td>
                  <td>text</td>
                  <td width=14 height=14 nowrap></td>
                  <td>text</td>
                  <td width=13 height=14 nowrap></td>
                  <td>text</td>
                  <td width=14 height=14 nowrap></td>
                  <td>text</td>
                  <td width=306 height=14 colspan=3 nowrap></td>
                </tr>
                <tr>
                  <td width=580 height=143 colspan=13 nowrap></td>
                </tr>
                <tr height="32">
                  <td colspan=13 height="32"></td>
                </tr>
                <tr>
                  <td width=580 height=170 colspan=13 nowrap></td>
                </tr>
                <tr>
                  <td width=545 height=44 colspan=12 nowrap></td>
                  <td>&nbsp;</td>
                </tr>
              </table>
            </td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
</body>
</html>

Oder?


Beste Grüße . . . Karsten
 
Original geschrieben von mactrisha
nur nicht Netscape 4.5 und 4.7, da geht das einfach nicht.

ich finde es ja ok, wenn man seine Webseite Browser kompatibel erstellt. Aber ich frage mich, warum testest du so uralte Netscape Versionen :confused:
 
Hi all,

Danke für die Antworten, das habe ich befürchtet. Ja, grummlich, genau das sollte funktionieren. Mauki, ich bin mir nicht so sicher, ob bei den PClern diese alten Browser wirklich schon ausgestorben sind, nur deshalb habe ich sie noch im Test. Kann ich sie ignorieren, würdest du sie ignorieren?

Salü,
mactrisha.
 
naja also den Netscape 4.7 würde ich ignorieren. Wer denn noch benutzt, also bitte das Ding ist schon Jahre alt.
 
klizekleine anmerkung zum code. vielleicht irre ich und mache es imemr umsonst aber sollte man in leere tabellen (<td></td>) nicht einen non-braking-space eintragen <td>&nbsp;</td>? ich glaueb diese angewohnheit habe ich von dreamweaver, aber vielleicht ist es auch nur stuss?

lg, joedelord
 
Original geschrieben von joedelord
klizekleine anmerkung zum code. vielleicht irre ich und mache es imemr umsonst aber sollte man in leere tabellen (<td></td>) nicht einen non-braking-space eintragen <td>&nbsp;</td>? ich glaueb diese angewohnheit habe ich von dreamweaver, aber vielleicht ist es auch nur stuss?

lg, joedelord

Doch, das soll man, wenn man vermeiden möchte, dass verschedene Browser die entsprechenden Zellen ignorieren.

Gruss, neptun
 
Mal ein genereller Tip: Wenn ihr nachsehen wollt wie eine Website in den "Major-" Webbrowsern auf PC aussieht, dann könnt ihr dafür ieCapture benutzen. Funktioniert sehr gut, ist aber manchmal überladen.

http://www.danvine.com/iecapture/
 
Zurück
Oben Unten