• Das Erstellen neuer Accounts wurde ausgesetzt. Bei berechtigtem Interesse bitte Kontaktaufnahme über die üblichen Wege. Beste Grüße der Admin

Tabelle mit Hintergrund auf 100%

Microkotz

New member
Mein Problem: Ich will eine Tabelle erstellen, die 100% der Seite einnimmt, wo das Hintergrundbild 100% Breite und 100% höhe hat.

Wie setze ich das um?
 
funktioniert leider nicht.

mein bisheriger Code
PHP:
<html>
<head>
<meta name="robots" content="noindex">
<title></title>
</head>
<body bgcolor="#4e5ca5">
<img src="unten.jpg" width="100%" height="100%">
</body>
</html>
nun soll das Bild Hintergrundbild werden, allerdings mit den Eigenschaften wie width="100%" height="100%".

Eine Lösung mit Tabellen wäre auch okay
 
mmhhh... sorry, das ich das sage, aber irgdenwas machste dann falsch....

ansonsten, warum machst du das nicht mit dem background-attribut... oder soll es nicht gekachelt werden.... ich mein es würde sogar besser aussehnen als wenn du ein pic in die länge und breite ziehest....
 
gekachelt werden soll es auf keinen Fall.
Ist ein Teil eines Framesets. Wenn das Bild verzogen wird, fällt das nicht auf.
 
schön wäre wenn min-width und min-height für die Größendefinition funktionieren würde.
Aber egal wie man es macht, die Größenangabe bezieht sich immer auf das Bild und nicht auf z.B. den <body
 
ha, geht doch *freu*

PHP:
<!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>test</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
html,body {
background-color: #999999;
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 0.9em;
margin: 0px;
padding: 0px;
height: 100%;

}
#backimg {
position: absolute;
left: 0%;
top: 0%;
width: 100%;
height: 100%;
}
#divbody {
position: absolute;
top: 0px;
left: 0px;
z-index: 1;
height: 100%;
width: 100%;
}

</style>
</head>

<body>

<div><img id="backimg" src="rgb.jpg" alt="" /></div>
<div id="divbody">
<!-- website inhalt -->

<!-- ende website inhalt -->
</div></body></html>
 
??

wow.....

Code:
<body style="font:1px" topmargin=0 bottommargin=0 leftmargin=0 rightmargin=0 marginwidth=0 marginheight=0>
<img src=back.gif width=100% height=100%>
</body>

??
 
Original geschrieben von womstar
??

wow.....

Code:
<body style="font:1px" topmargin=0 bottommargin=0 leftmargin=0 rightmargin=0 marginwidth=0 marginheight=0>
<img src=back.gif width=100% height=100%>
</body>

??
das Bild muss als "Hintergrund" fungieren...

@biene Danke! funktioniert toll!
 
hab mir mal das bsp von wom angesehen.

Sieht ja schön kurz aus. Könnte mann auch so schreiben, damit es als Hintergrund funktioniert.
PHP:
<html>
<head>
<title> hintergrundbild auf 100% skalieren  </title>
</head>
<body topmargin=0 bottommargin=0 leftmargin=0 rightmargin=0 marginwidth=0 marginheight=0>
<div style="z-index:1"><img src=rgb02.jpg width=100% height=100%>
<div style="z-index:2; position:absolute; top:0px; left:0px">
<table width=100%>
<tr>
<td>Hallo hier ist der Inhalt</td>
</tr>
</table>
</div>
</div>
</body>
</html>
 
Zurück
Oben