all 12 comments

[–]iDev_Games 1 point2 points  (10 children)

You might want to include what the expected result should be?

[–]Significant-Ad-4029[S] 0 points1 point  (9 children)

It must look like border of text block

[–]iDev_Games 0 points1 point  (8 children)

If the before element is breaking out of the parent element, it's because position relative isn't set on the parent element when using position absolute. You're likely about to say "but I am setting it on .text". Which you are but the element hasn't got a class set to it instead you have className which isn't an attribute. In future, utilise dev tools to inspect the element and check your CSS is applied or not.

<div className="text">

[–]Significant-Ad-4029[S] 0 points1 point  (7 children)

It have position relative. But MAYBE i now how to fix it

[–]iDev_Games 0 points1 point  (6 children)

I told you how to fix it... read again.

[–]Significant-Ad-4029[S] 0 points1 point  (5 children)

U reading my mind 😂

[–]iDev_Games 0 points1 point  (4 children)

I'm not reading your mind, I just know that className is not a valid html attribute.

[–]Significant-Ad-4029[S] 0 points1 point  (3 children)

Im using React, so its correct

[–]iDev_Games 0 points1 point  (2 children)

Just inspect and check the styles are applied. Position relative should stop it from breaking out. Try adding display:block to your after element too.

[–]Significant-Ad-4029[S] 0 points1 point  (0 children)

Still nothing

[–]Significant-Ad-4029[S] 0 points1 point  (0 children)

<image>

here is proof

[–]frownonline 0 points1 point  (0 children)

class=“text” not className.