Bogdan Mihai Bogdan Mihai - 1 year ago 71
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.

Answer Source

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

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

Working Example.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download