php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68003 <!DOCTYPE html> appears to break linked css
Submitted: 2014-09-10 20:51 UTC Modified: 2014-09-10 21:05 UTC
From: scratch65535 at att dot net Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 5.5.16 OS: XPSP3, FreeBSD 9.2
Private report: No CVE-ID: None
 [2014-09-10 20:51 UTC] scratch65535 at att dot net
Description:
------------
Using HTML 5's <!DOCTYPE html> with <link>'d css file seems to cause php to fail to read the css, or fail to pass it to the interpreter in Firefox 32 and Opera 24.0.1558.53 under XP, and Firefox 17.0. under FreeBSD 9.2

Firebug sees the <link> reference but believes the file is empty.

Removing the doctype reference restores the css file's effect.

Using an html 4 doctype reference doesn't disable the css styling.

Including the css code in the <head> produces styled output regardless of whether doctype html is present.

Test script:
---------------
.Bkgd {
    background-color:#990000;
    color:#FFFFFF;
    padding:30px;
    margin-top:50px }

========================

<?php
    echo
//    '<!DOCTYPE html>'.
    '<html>
        <head>
            <meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=ISO8859-1"></meta>
            <link href="_____html5test.css" type="text/css" rel="stylesheet" ></link>
        </head>
        <body>
            <div class="Bkgd">
                Hello world
            </div>
        </body>
    </html>' ;
?>




Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-09-10 21:05 UTC] aharvey@php.net
-Status: Open +Status: Not a bug
 [2014-09-10 21:05 UTC] aharvey@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

PHP doesn't parse the HTML that is output, nor does it handle style sheets.
 [2014-09-11 13:11 UTC] scratch65535 at att dot net
You seem to be right, though after seeing the problem in 3 different browsers and 2 operating systems where php was the only constant, I really didn't think I needed to test html alone.  More the fool me, I suppose, though since the latest FF and Opera browsers are both alleged to support that doctype, I can't imagine where to begin looking for the source of the problem.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 03 07:01:32 2024 UTC