Why is my text disappearing when I add styles to the second one

Link to my CodePen:
Images as text (codepen.io)

Is there any problem with my styling? because it seems just fine, but after I add the styling for the second one, it automatically disappears. Please help.

Looks like it is the height on .flex-container that is causing it. BTW, your pseudo-element selector isn’t correct (should be a class .text::after).

Thanks for the reply @lasjorg, will definitely try

Hello ,I am confused by what you mean by the height on .flex-container could be causing the problem. What should the height be? I am doing this with the help of a video tutorial, and the height was 100vh.

If I removed the height it worked. I think it had to do with the positioning but you have changed the CSS in the Codepen so I can’t see it anymore.

Hello, thanks for replying. I edited some code and it worked fine. Thanks a lot :smiley:

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.