Trying to create a "chat bubble" type of thing and here is my code. The little triangle is made via a pseudo element ::after but I can't make it show.
Any ideas what I am doing wrong?
.playernamechat.self-message { width: auto; background-color: blue; border-radius: 12px; padding: 5px 10px; margin-left: 5px; display: inline-block; max-width: 280px; overflow: hidden; float: left; position: relative; color: white; } .self-message::after { content: ""; position: absolute; top: 50%; right: 100%; margin-top: -5px; border-width: 5px; border-style: solid; border-color: #555 transparent transparent transparent; } <span class="playernamechat self-message">hello</span>
overflow: hidden;in the.playernamechat.self-messagestyling. The pseudo element is showing outside it, so this property is hiding it.overflow: hidden. It is a chat bubble and I do not want it to overflow with textposition: absolutefrom:afterwithposition: relativeoverflow:hiddenI usedoverflow-wrap: break-wordwhich did the same thing but allowed me to have a regular overflow. If you havent already go comment your answer so I can upvote it!