1
Ich habe eine div mit einer display: flex
, und ich möchte die Ausgabe in einer Zeile Mitte anzeigen. Aus irgendeinem Grund wird links angezeigt. Ich möchte die imgBoxBot
in der imgBot
div
zentriert werden. Aber text-align: center
zentriert nur den Text innerhalb der imgBoxBot
, wie zentriere ich die tatsächliche div
?div mit display: flex ist nicht zentriert kind div
#imgBot {
position: absolute;
height: 100px;
width: 100%;
bottom: 0;
display: flex;
flex-direction: row;
text-align: center;
}
#imgBoxBot {
height: 100px;
width: 100px;
}
<div id="imgBot">
<div id="imgBoxBot">
test
</div>
<div id="imgBoxBot">
test
</div>
</div>
Sie nicht die gleiche ID auf der gleichen Seite verwenden können. ändere #imgBoxBot in eine Klasse. –