#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2001
    Location
    Canada
    Posts
    7
    Rep Power
    0

    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.

    P.S.
    I did try <div class=\"sub\">Text</div>, but that did not work also.

    Comments on this post

    • JimmyGosling agrees
    Last edited by rght_99; May 13th, 2001 at 05:05 PM.
  2. #2
  3. No Profile Picture
    Divine Wind
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2001
    Location
    Mongo
    Posts
    24
    Rep Power
    0

    Obvious answers


    Some obvious answers spring to mind :

    1. Server side:

    Have the < and > been converted to entities? See this and related functions (in left bar):

    PHP.net

    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.

    Emps

IMN logo majestic logo threadwatch logo seochat tools logo