php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25111 Switch Function Causing Irregular Margin
Submitted: 2003-08-16 21:30 UTC Modified: 2003-08-17 00:03 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: swift_mcviegh at hotmail dot com Assigned:
Status: Not a bug Package: Output Control
PHP Version: 4.3.3RC3 OS: Windows 2000
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: swift_mcviegh at hotmail dot com
New email:
PHP Version: OS:

 

 [2003-08-16 21:30 UTC] swift_mcviegh at hotmail dot com
Description:
------------
When I use the switch function, it pushes an odd margin into the scene. Due to limits on the posting of code, i was not able to post the body tag, required to reproduce the problem. I will post it below.
I wish to make a table cover the entire top of the screen, left to right. Without using the switch function, it works fine. SO i dont know exactly what happened.

Body Code:

<body bgcolor="#336699" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">


Reproduce code:
---------------
<?php
 switch ($action)
 {
 case "bleh":
?>
<table width="870" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
    <td width="132" bgcolor="#003399">&nbsp;</td>
    <td width="594">&nbsp;</td>
    <td width="144" bgcolor="#003399">&nbsp;</td>
  </tr>
</table>
<?
  break;
  default:
?>
<a href="index.php?action=bleh">click this now!</a>
<?
  }
?>

Expected result:
----------------
I expect the table lined across the top to appear fully left to right with NO margins

Actual result:
--------------
I get an odd push of the table, this ends up pushing the table to the left

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-08-16 21:33 UTC] swift_mcviegh at hotmail dot com
EDIT:

Code SHOULD BE As listed below:

<body bgcolor="#336699" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#003399">
  <tr>
    <td><font color="#FFFFFF" size="2" face="Verdana"><strong>Swiftymc - Coming 
      Soon</strong></font></td>
  </tr>
</table>



Im sorry for the mistake
 [2003-08-17 00:03 UTC] sniper@php.net
Watch your whitespace. (ask further questions on php-general@lists.php.net)

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 09 13:01:36 2025 UTC