Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pseudo elements on tables?

I'm trying to apply a pseudo element to a <tr> but turns out it's not working as expected. I'm not sure if i'm missing anything or if it's just simply not possible.

Here's a jsfiddle example: http://jsfiddle.net/jDwCq/

Notice that if you change the display of tr to display: block;, the pseudo element will show up, but it is displayed as a block rather than a table, which i need.

Is it possible or am I doomed?

like image 475
qwerty Avatar asked Feb 21 '26 01:02

qwerty


1 Answers

table tr:before{
position: relative; /* Needed for pseudo elem */
display: block; /*Uncomment me and see what happens*/
}

this should work...

like image 52
Akhil Avatar answered Feb 22 '26 23:02

Akhil



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!