Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Fast-Nop39106327dAgree with the SO answers. Your CSS selector chain doesn't match the markup hierarchy, and the old HTML you provided probably isn't the complete old HTML.
Example, the alternate line background. Your CSS:
table tbody tr:nth-child(2n + 1) {
background-color: rgba(220, 220, 220, 0.25);
}
So your markup must be a table tag, then inside that, a tbody tag, inside that, a tr tag. There may be other levels inbetween, so you don't need that hierarchy directly, but the chain needs to be there. Like, something like a table-div-tbody-div-div-tr would also match the tr. -
PaperTrail10605327d> "You guys are probably better than SO"
Ha! He don't know us very well, does he? -
TheBeardedOne3130326d@Fast-Nop It's definitely the entire original html. Looking again at the CSS I see what you're saying now I'm just surprised it's been working at all
-
TheBeardedOne3130326d@Fast-Nop So how's this for strange, adding the tbody tags in the html/react did not solve it but removing them from the css did
Related Rants
Having trouble getting CSS to apply to a table in react. Thought I'd ask here. You guys are probably better than SO. Please and thank you
https://stackoverflow.com/questions...
question
css
react