PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Strict XHTML validation when outputting CSS

  1. I am having difficulties getting my page to validate when outputting CSS with my forms. If I turn off the CSS, the page passes W3C validation. However when I am using the Gravity Forms CSS output I get the following message and fail W3C validation:

    Line 218, Column 261: document type does not allow element "link" here

    It seems this code is causing the problem:

    <link rel='stylesheet' id='gforms_css-css' href='http://www.cehwitham.com/alex/wp-content/plugins/gravityforms/css/forms.css?ver=3.0.4' type='text/css' media='all' />

    The form is displayed on my homepage: http://www.cehwitham.com

    Please advise if I can move the stylesheet links into the head section or solve this problem by other means.

    Posted 13 years ago on Thursday January 6, 2011 | Permalink
  2. Yes, you can go to the main form settings page and set the "Output CSS" option to no. Then you can manually add the reference to the stylesheet in your header.php file however you would like.

    screenshot: http://grab.by/8e9r

    Posted 13 years ago on Thursday January 6, 2011 | Permalink