Bogdan Mihai Bogdan Mihai - 9 months ago 40
CSS Question

Can I set a predefined text content of a table cell in a CSS class?

I tried this:

<style type="text/css"> : before { background: #DD5F15; content : "TRIPLE";}

But I believe it adds the content provided after the closing "td" tag, which is why it doesn't show up.
Basically, I just want all the "orange" table cells to just have the text "TRIBLE" inside them.


You have : before { background: #DD5F15; content : "TRIPLE";}

Try this (remove spaces before and after of colon : ) { background: #DD5F15; content : "TRIPLE";}‚Äč

Working Example.