sorry....link zur seite vergessen
www.nails-in-heaven.de/page
Hallo!
Vorab: ich bin kein Profi. Ich schreib nur das in den Code was ich gesagt bekomme. Also seid bitte nachsichtig mit mir. Und: die Page hab nicht ich erstellt.
Und jetzt zum Problem: ich möchte gerne den Block und den Text in die Mitte der Seite setzen. Was muss ich ändern, damit das geht?
Hier der css-Text:
Code:#box1 { background-image: url(../img/bg.gif); height: 733px; width: 1000px; } a:link{ color:#9B9B9B; background-color:transparent; text-decoration: none; font-weight: normal; } a:visited{ color:#9B9B9B; background-color:transparent; text-decoration: none; font-weight: normal; } a:active{ color:#000000; background-color:transparent; font-weight: normal; } a:hover{ color:#E6BEEE; text-decoration: underline; font-weight: normal; } body { margin: auto; position: center; background-image: url(../img/bg2.gif); background-repeat: x-repeat; background-color: white; font-size: 11px; font-family: Arial, Verdana, Tahoma; color: #333; text-align: center } #navi { position: absolute; top: 115px; left: 348px; width: 480px; } #content { { margin: auto; position: center; width: 700px; border: 1px solid blue; } } #footer { position: absolute; top: 685px; left: 230px; height: 20px; width: 598px; font-size: 10px; color: #999; text-align: right; } .navi_link a { float: right; text-align: center; padding-left: 9px; padding-right: 9px; height: 27px; background-image: url(../img/nav_off.gif); text-decoration: none; color: #000000; margin-left: 1px; margin-top: 1px; padding-top: 5px; } .navi_link a:hover { float: right; text-align: center; padding-left: 9px; padding-right: 9px; height: 27px; background-image: url(../img/nav_on.gif); text-decoration: none; color: white; margin-left: 1px; margin-top: 1px; padding-top: 5px; } #footer a { color: #999; text-decoration: none; }
sorry....link zur seite vergessen
www.nails-in-heaven.de/page
Danke erstmal:
mein Göttergatte versucht sich jetzt auch daran. Ich hab ihm gesagt, er soll die Zentrierung mal mit margin versuchen. Mal schauen ob er auf mich hört.
Kann es sein, dass ich das aber gar nicht in der css-Datei angeben muss sondern in der index.php?
hm...geht nicht. Er macht mir keine Hoffnung. Der code scheint total verhunzt zu sein.
Mensch, hat nicht zufällig jemand Lust mir den neu zu schreiben. ;-)
Hey
Das CSS ist echt nicht gut, aber man kann es anhand von 2 Stellschrauebn so positionieren, wie du es haben willst:
1. Schritt
Code:#box1 { background-image: url(../img/bg.gif); height: 733px; width: 1000px; margin: 0 auto /* Zentrierung der ganze Seite, ausser des Inhaltes */ }
2. Schritt:
Code:#content { position: absolute; top: 220px; left: 50% /* Abstand nach Links ändern */; height: 430px; width: 578px; padding-left: 15px; padding-right: 10px; margin-left: -289px /* Negative Haelfte der Breite */ }
vielen lieben Dank. Ich hab mich jetzt aber mittlerweile entschieden meine Seite wieder in html zu schreiben. Ist für mich einfacher wenn ich mal was ändern will. Ich möchte sie nämlich komplett neu gestalten und da ist mir css einfach zu schwer.
Trotzdem vielen Dank.![]()
body {
margin: 0px auto;
width: 1000px;
background-image: url(../img/bg2.gif);
background-repeat: x-repeat;
background-color: white;
font-size: 11px;
font-family: Arial, Verdana, Tahoma;
color: #333;
}
ausserdem hast Du 2x den <body> Tag drin
Es gibt Tage, da verliert man...und es gibt Tage, da gewinnen die anderen.
Hardwarejournal.de | MP3-runterladen.com | Kinderpilot.de
Ja, darüber hat sich mein Mann auch gewundert. Ich sag ja, der Code ist wohl total daneben.![]()
Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)
Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)