CSS in Table Field
Why is it that when I put a tag like <div class="sub">Text</div> in a field in my table, the class="sub" does not work (the word "Text" is printed though) when I print the field using PHP? I'm sure the link to the style sheet is correct, because I tested it by printing something other than from the db.
I did try <div class=\"sub\">Text</div>, but that did not work also.
Comments on this post
Last edited by rght_99; May 13th, 2001 at 05:05 PM.
Some obvious answers spring to mind :
1. Server side:
Have the < and > been converted to entities? See this and related functions (in left bar):
2. Client side:
a) Is the class on the page or linked to it?
b) Is the CSS written correctly (easy ways to mess things up include leaving off the # from colours and the ; from the end of each style.
These are all pretty obvious problems but also the most likely possible cause.
If it isn't anything to do with this then post more of the code.