Thomas J.S.: Bild im div-Bereich ==> Lösung + pers. Kommentar zum Forum

Beitrag lesen

Hallo,

du scherzkeks ;-)

wenn von validem code die rede ist, brauchst du doch nicht mit einem beispiel kommen, das noch nicht mal eine doctype-angabe beinhaltet.

Versuche es mit dem IE (bei code 2 ist wiederum das <div><img></div> in einer zeile)

Grüße
Thomas
---------------- code 1 --------------
<?xml version="1.0"?>
<!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">
   <head>
      <title>
      </title>
   </head>
   <body style=" background-color:black ">
      <div style=" width:800px; height:300px; background-color:yellow;">
         <img src="bild.gif" width="500" height="300" alt="" border="0" />
      </div>
   </body>
</html>

--------------- code 2---------------

<?xml version="1.0"?>
<!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">
   <head>
      <title>
      </title>
   </head>
   <body style=" background-color:black ">
      <div style=" width:800px; height:300px; background-color:yellow;"><img src="bild.gif" width="500" height="300" alt="" border="0" /></div>
   </body>
</html>
-------------------------------------