ManU.K: Box mit zentriertem Text erstellen

Beitrag lesen

@@ManU.K

Ich hoffe ihr versteht mein Problem.

Nein. Und das sagte dir MrMurphy1 auch schon.

LLAP 🖖

„Wenn du eine weise Antwort verlangst, musst du vernünftig fragen.“ —Johann Wolfgang von Goethe

So sieht mein Code aktuell aus:

<style> 
    .container{
        background-color:antiquewhite;
        width: 100%;
        height:10em;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .item{
        background-color: aqua;
        text-align: center;
        width: 100px;;
    }

</style>

</head>

<body>

<div class="container"> <div class="item">TEXT</div> </div>

</body>

Damit bekomme ich einen "Container", der vertikal und horizontal ein zentriertes "Item" enthält. Jetzt will ich statt eines einfachen divs ein Bild und das "Item" soll in diesem Bild zentriert werden. Wie mache ich das?