Problems with !DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"

When I include <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd&quot;&gt; in my header, my CSS files no longer show... they show up in code though, <%= stylesheet_link_tag 'display' %> becomes <link href="/stylesheets/display.css?1208424886" media="screen" rel="stylesheet" type="text/css" />.

I heard Rails is hard-coded to only do XHTML, and that I might have to do some monkey patching. But I'm clueless as to how.

Mister Blood Rails wrote:

When I include <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd&quot;&gt; in my header, my CSS files no longer show... they show up in code though, <%= stylesheet_link_tag 'display' %> becomes <link href="/stylesheets/display.css?1208424886" media="screen" rel="stylesheet" type="text/css" />.

I heard Rails is hard-coded to only do XHTML, and that I might have to do some monkey patching. But I'm clueless as to how.

Here's a crazy idea: Use XHTML. Learning to properly nest tags and use self-closing tags isn't that big of a deal, really. It's easier than learning to use Ruby and Rails' DSL for web apps.

- -- Phillip Gawlowski Twitter: twitter.com/cynicalryan

Will I dream? ~ -- HAL-9000

Turned out I had some stale XHTML tags around.

Anyway I've heard that future versions of HTML will not be based on HTML as opposed to XHTML, hence there's no point in switching.

"Are you using XHTML? READ THIS: Beware of XHTML , http://hixie.ch/advocacy/xhtml , Validity and Well-formedness , http://www.csarven.ca/interview-with-steven-pemberton&quot;

From freenode #html..

Actually my problem didn't go away.

Considering giving http://dev.turnipspatch.com/trac/wiki/HTMLOutput a go...

I'm using Apache+mod_rails, like this:

<VirtualHost *:80>   ServerName mysite.com   ServerAlias www.mysite.com   DocumentRoot /services/httpd/mysite.com/public   <Directory "/services/httpd/mysite.com/public">     Options FollowSymLinks     AllowOverride None     Order allow,deny     Allow from all   </Directory>   RailsBaseURI / </VirtualHost>