I am newbie when it comes to CSS. I am creating a custom stylesheet for a website (CMS) and I can’t modify the source. I am therefore trying to resolve some problems which could easily be solved by editing the source. On the other hand it does give additional challenges ;)
I want to know if it is possible to replace text with an image if the source looks like this:
The code for ‘read’ should be similar too.
As you mentioned that this is for a forum, hence, am sure you must be using some server scripting language. You have to dynamically change the class of that table data to ‘unread’ or ‘read’.
Am sure there must be some better way to do this too…
Thanks for the replies…. Question how do I give the TD a background if I can’t change the html code to give the TD a class.
That’s basically the challenge there is no span, anchor or class in the code. If changing the code is currently no option is it possible to add a background image of the TD via the stylesheet? If so what would the CSS code look like?
I presume that the ‘read’ and the ‘unread’ notification would change dynamically when the user visit’s a particular post. If you set the background image of the td by giving it a static class, then the image won’t change when the notification changes…
There is no span/class in the old code because the read/unread notification was meant to be in text. Hence, the person who wrote that code, didn’t think it was necessary to give it any class. What I would suggest is to google on how would you check if the post is read or unread, then use pHp to assign that td a specific class and then style those classes using CSS.
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic.
*May or may not contain any actual "CSS" or "Tricks".