Req #24095 [Opn->Nab]: phpinfo styles override page styles and damage appearance
| From: | ajf@php.net | Date: | Thu, 08 Jan 2015 22:32:41 +0000 |
| Subject: | Req #24095 [Opn->Nab]: phpinfo styles override page styles and damage appearance | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-189760@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=24095&edit=1
ID: 24095
Updated by: ajf@php.net
Reported by: generic at thetahat dot com
Summary: phpinfo styles override page styles and damage
appearance
-Status: Open
+Status: Not a bug
Type: Feature/Change Request
-Package: Feature/Change Request
+Package: *General Issues
Operating System: Windows XP SP1
PHP Version: 4.3.2
Block user comment: N
Private report: N
New Comment:
phpinfo() isn't meant to be embedded.
Use an iframe.
Previous Comments:
------------------------------------------------------------------------
[2006-10-14 20:58:50] joe at monkeydepartment dot com
This problem still exists in PHP5 and it is obnoxious. It
would be trivial to set up phpinfo's CSS so it descends from
a style called "phpinfo". Then phpinfo() could
enclose itself in a <div class="phpinfo">, without any
further modifications to itself.
Like this:
<style>
.phpinfo body {style=whatever}
.phpinfo td {style=whatever}
.phpinfo table {style=whatever}
etc, etc, etc
</style>
Then anything within a <div class="phpinfo"> will inherit
those styles. Absolutely basic CSS and it doesn't even
require changing the actual phpinfo() output.
------------------------------------------------------------------------
[2004-04-01 14:53:17] csaba at alum dot mit dot edu
Yes, phpinfo is a super function, but it should also be a nice player and please not hog the styles
on my previously generated elements. Here's an example that illustrates this (tried on IE6 on
Win2K with PHP 5.0.0RC1). The TEXTAREA element is supposed to fill the first (multi rowspan) TD
element. if you uncomment the phpinfo line at the bottom, then you'll see that the TEXTAREA
element nearly disappears. This is because the style sheet genereated by phpinfo sets the TD style
to have vertical-align:baseline. Notice that the body color changes for similar reasons. And the
links would change, too, if I had them.
Csaba Gabor
<html>
<head><title>PHP output result page</title></head>
<body bgcolor=yellow onLoad=
"var
mytd=document.getElementById('mytd');mytd.style.height=mytd.offsetHeight">
<table bgcolor="orange" border=1 id=mytd>
<tr><td rowspan=3><textarea style="width:100%;height:100%">
This should ALREADY fill the cell</textarea></td>
<td>One</td></tr>
<tr><td>Two</td></tr>
<tr><td>Three</td></tr>
</table>
</body>
</html>
<?php //phpinfo() ?>
------------------------------------------------------------------------
[2003-06-09 08:52:30] generic at thetahat dot com
I'm all for using styles on the phpinfo output but since it's redefining basic page
elements it's difficult to include phpinfo output on a page when debugging. The choice of
style names are all that need to change. For instance, instead of redefining "table", use
a class name like #phpinfotable and instead of a basic names like ".e" use
".phpinfocell", instead of "h1" use "h1.phpinfo",
"a:link#phpinfo", etc.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=24095&edit=1