I have an ordered list(ol) on my project and I wanna add an pseudo elements (::before,::after), If I write ::before and ::after separately its accepting whatever style I gave and its appearing on server, otherwise, its not showing up the result on live server. Here below I left my code and live server pics... Sorry, my explanation will not be clear but I uploaded two pictures for more understanding.
[when I gave 1 to the content its working[][1]][but it is not working when I wrote ::before and ::after in one class 2]
Here is my code:
.cinema-seats__list:first-child::before
.cinema-seats__list:first-child::after {
content: "1";
}
if I delete .cinema-seats__list:first-child::after this part its gonna work
.cinema-seats__list {
display: flex;
justify-content: space-between ;
list-style: none;
padding: 0;
margin: 0;
}
CodePudding user response:
.cinema-seats__list:first-child::before,
.cinema-seats__list:first-child::after {
content: "1";
}
You have to put coma(,) seperate line just like above code.