Halte div am unteren Rand eines anderen Bereichs
© 1965 - 2010
Ich will das #Urheberrecht an der Unterseite der #äußeren
Hier ist der css-Code für #copyright
#copyright{
position:relative; margin-bottom:0px; width:672px; height:20px; color:#FFF;
}
#yr{
margin:auto;
}
#f{ position:absolute; right:0px; text-align:center;
}
Dank
Jean
InformationsquelleAutor der Frage X10nD | 2010-07-08
Du musst angemeldet sein, um einen Kommentar abzugeben.
Wird dies den unglücklichen Nebeneffekt, obwohl, dass
#copyright
zählen nicht in Richtung der Höhe der#outer
mehr, ist in deinem Beispiel#outer
wäre 0px hoch. Sie können hinzufügen, ein bottom-padding#outer
wenn Sie arbeiten mit festen Höhen.InformationsquelleAutor der Antwort deceze
set #copyright auf position:absolute; bottom: 0; left: 0;
#
äußeren {height: 100px;
border: 1px solid red;
position: relative;
}
#
copyright {position:absolute;
height: 30px;
bottom: 0;
left: 0;
border: 1px solid black;
width: 300px;
}
Auch, niemals "0px". Es gibt keine solche Sache wie null Pixel, nur null. Richtige Weg ist "right: 0;"
InformationsquelleAutor der Antwort Māris Kiseļovs
Ich würde das tun auf diese Weise:
InformationsquelleAutor der Antwort koshin
Ändern Sie die Positionierung auf
#copyright
absoluten und fügen eine relative Positionierung Kontext zu#outer
. Dann fügen Siebottom: 0px
zu#copyright
als gut.Sorry. CSS würde so Aussehen:
InformationsquelleAutor der Antwort desertwebdesigns