|
|||
div ausrichtung oben | mitte | unten
Hi,
Also ich hab schon ne Weile rumprobiert, allerdings weiss ich im Moment nicht weiter. Deshalb jetzt meine Frage an Euch: Ich möchte meine Seite so aufbauen, dass ich oben an der Kante anfange und unten an der Kante aufhöre. Deshalb hab ich mir gedacht, mach ich Oben einen Div, Unten einen und in der Mitte einen, der sich streckt, und somit das ganze abschließt. Und das ganze noch zentriert, so dass ich völlig unabhängig von der Auflösung bin und der Bildschirm immer gefüllt ist. Hier mal mein Quelltext: index.php Code:
<?xml version=\"1.0\" encoding=\"UTF-8\"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>xtoph's online portfolio</title> <link rel="stylesheet" type="text/css" href="css/style.css" /> </head> <body> <div style="text-align:center"> <div style="margin:auto; top:0px; text-align:left"> banner oben </div> <div style="margin:auto; height:all; background: url(./bilder/bg.jpg); width:810px;"> inhalt </div> <div style="margin:auto; width:810px;" > <div style="position:absolute; bottom:0px;"> footer</div> </div> </div> </body> </html> so siehts im moment aus: http://zeus.fh-brandenburg.de/~franzc/neu2/ http://zeus.fh-brandenburg.de/~franz.../css/style.css Wäre schön, wenn vielleicht jemand eine idee hätte greetz xtoph |
Sponsored Links |
|
||||
Du hast im Body schon text-align:center, wozu jetzt noch nen extra div mit style="text-align:center" ?
margin:0;padding:0; erreicht dasselbe wie 0px 0px 0px 0px. in der Footerclass definierst du Code:
text-decoration:none; font-style:normal; text-decoration:none; font-style:normal; [qoute] Code:
<div style="margin:auto; width:810px;" > <div style="position:absolute; bottom:0px;"> footer</div> </div> warum nicht lieber so: Code:
<div style="margin:auto;width:810px; position:absolute;bottom:0px;"> footer </div> Code:
<html> <body style="margin:0;"> <div style="position:absolute;top:0px;height:10px;">header</div> <div style="height:100%;padding-top:;padding-bottom:;">body</div> <div style="position:absolute;bottom:0px;height:10px;">footer</div> </body> </html>
__________________
Bitte keine PN's - schreibt mir ne anständige Mail oder sprecht mich über Msn / Icq an Milian Wolff | Markdownify | Typogridder |
Sponsored Links |
Themen-Optionen | |
Ansicht | |
|
|
Ähnliche Themen | ||||
Thema | Autor | Forum | Antworten | Letzter Beitrag |
Brauche Hilfe: Schwarzes Nichts | Zwox | CSS | 10 | 19.11.2010 17:53 |
DIV um 40px nach oben verschieben | Dylan | CSS | 3 | 03.02.2010 22:14 |
Div immer oben im fenster | xXNemesisXx | CSS | 3 | 25.09.2008 22:57 |
DIV Box in der mitte des Browserfensters | grazioli | CSS | 1 | 15.11.2006 22:27 |
Holy Grail und der Internet Explorer! | ONeill | CSS | 23 | 01.06.2006 19:20 |