Results 1 to 3 of 3

Thread: Property font-weight doesn't exist

  1. #1
    Join Date
    Jun 2007

    Question Property font-weight doesn't exist - PHP string

    I tried using the jigsaw.w3.org css-validator on a php file - with the property option set to level 3 CSS on the validation page. This is a local style embedded inside a php string.

    I'm getting an error that says:
    Property \"font-weight doesn't exist : bold as shown here.

    Here is the string it's referencing: (it matches the example in my book)
    print "<div>Thank you, <span style=\"font-weight:bold; color:yellow; \">$name</span> for your posting:<p>$posting</p><div>";
    The string, and data-entry-form work fine. The entire web page all works. It just won't validate past this error.

    At this point I'm assuming the validation site above is only for CSS pages exclusively and will not validate local styles embedded inside php strings?
    I'm not sure what to do about this because the print statement matches a similar example in the book I'm learning from.
    Last edited by waveform; 06-09-2013 at 05:41 PM.

  2. #2
    Join Date
    Sep 2008
    Akron, OH
    You're validating by the file upload? It looks like you can only upload CSS files.
    I'm always up for networking with fellow web professionals. Connect with me on LinkedIn if you like!

  3. #3
    Join Date
    Jun 2007
    Hello cbVision,

    Yes, I used the upload file option.

    I did find a few similar questions on other boards and from what some people have said,
    there really isn't a way to validate a php page because it's server side so the php code is invisible to the validation checker ..as is the case with the end users visiting your site (by design php is hidden to the end user or in this case the validation site). And the truth is, if there was an error in the string, php would output an error message because I have error reporting turned on.

    My code works as expected --> see <-- and this php page passes the xhtml validation at least. So I think it's ok.
    Last edited by waveform; 06-10-2013 at 05:27 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center