Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    May 2004
    Posts
    38
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Include/Alignment Prob -- OK on Mac, screwed on PC

    I've got a problem with a PHP/mySQL site that I've created recently. I programmed everything on a Mac and it displays perfectly, but the band for whom I did it for got some reports of the site being screwy on PCs. The page is basically organized into two columns, with all of the content organized in different tables in different cells. I've created include file for the head and the foot, then dynamically inserted content for each page -- the structure from an included PHP file, and the content from mySQL. I got a screen shot see here:

    http://www.shurmanville.com/shurman_screenshot.jpg)

    and it looks like the main left column is all out of whack. Here's a screenshot of what it's supposed to look like:

    http://www.shurmanville.com/shurman_...hot_normal.jpg

    I'm not sure why this would be happening, I checked out the source code and everything looks OK. If someone could help, I'd really appreciate it. Here is the direct link for the actual page behind the screenshot above:

    http://www.shurmanville.com/shows.php

    From what I've heard, this misalignment seems to be occuring for every section except the 'Press' section. If it helps, here is my code for the header and footer includes:

    Header Include:

    Code:
    <?php 
    require("db_connect.php");
    $headphotos = array();
    $headdir = "mainhead_photos";
    $headhandle = opendir ($headdir);
    while (false !==($head = readdir ($headhandle))){
    	$length = strlen($head);
    	$start = $length - 3;
    	$fileext = substr ($head, $start, $length);
    	if ($fileext == "jpg"){
    		$headphotos[] = $head;
    	}
    }
    $randnum = rand (0, (count($headphotos)-1));
    $randnum = round($randnum);
    $headimage = $headdir."/".$headphotos[$randnum];
    ?>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title><?php print ("$page_title"); ?></title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <link href="css/global.css" rel="stylesheet" type="text/css">
    <link rel="SHORTCUT ICON" href="images/favicon.ico">
    <script language="JavaScript" type="text/JavaScript">
    <!--
    function MM_swapImgRestore() { //v3.0
      var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
    }
    
    function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    }
    
    function MM_findObj(n, d) { //v4.01
      var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && d.getElementById) x=d.getElementById(n); return x;
    }
    
    function MM_swapImage() { //v3.0
      var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
       if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    }
    
    function popWin(youRL,windowName, features){
    	window.open (youRL, windowName, features);
    }
    
    //-->
    </script>
    </head>
    
    <body class="shurmanbg" topmargin="0" rightmargin="0" leftmargin="0" bottommargin="0" onLoad="MM_preloadImages('images/nav_news_over.gif','images/nav_shows_over.gif','images/nav_audiovideo_over.gif','images/nav_photos_over.gif','images/nav_merch_over.gif','images/nav_press_over.gif','images/nav_forum_over.gif','images/nav_contact_over.gif','images/nav_links_over.gif')">
    <table width="100%" height="100%"  border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="115" rowspan="5">&nbsp;</td>
        <td width="390" height="300" rowspan="2" align="right"><img src=<?php print ("$headimage"); ?> width="390" height="300"></td>
        <td width="310" height="245"><img src="images/main_head_pinata.gif" width="310" height="245"></td>
        <td width="117" rowspan="5">&nbsp;</td>
      </tr>
      <tr>
        <td height="55"><img src="images/main_head_logo.gif" width="310" height="55"></td>
      </tr>
      <tr>
        <td height="20" colspan="2">&nbsp;</td>
      </tr>
      <tr>
        <td height="40" colspan="2" align="center" valign="top">
    	<?php require("shurman_nav.php"); ?>	</td>
      </tr>
      <tr>
        <td colspan="2" align="center" valign="top"><table height="100%" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td colspan="5"><img src="images/main_topedge.gif" width="700" height="10"></td>
            </tr>
          <tr>
            <td width="10" rowspan="3" class="border_left">&nbsp;</td>
            <td width="680" colspan="3" align="left" valign="top" bgcolor="#666D2E">
    Footer Include:

    Code:
    		</td>
            <td width="10" rowspan="3" class="border_right">&nbsp;</td>
          </tr>
          <tr>
            <td height="15" colspan="3" align="center" valign="middle" bgcolor="#666D2E"><img src="images/main_spacer.gif" width="680" height="1"></td>
            </tr>
          <tr>
            <td width="680" colspan="3" align="center" valign="middle" bgcolor="#666D2E" class="foot_text">
    		<?php require ("foot_table.php"); ?>
    		</td>
          </tr>
        </table></td>
      </tr>
      <?php mysql_close(); ?>
    </table>
    </body>
    </html>
    Thanks for any help anyone can offer...
    Last edited by ascend; 05-18-2005 at 09:50 PM.

  • #2
    Regular Coder
    Join Date
    Jul 2004
    Location
    mile high city
    Posts
    482
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You'll likely have better luck getting this sorted in the HTML/CSS forum. You can send a PM to a moderator to have it moved, but please don't cross post.

    For those who don't have access to a Mac to see what you're intending, can you explain "the main left column is all out of whack"? Or post a screenshot of how it should appear?
    Computer, kill Flanders... Did I hear my name? My ears are burning...
    Good start. Now finish the job.

  • #3
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,280
    Thanks
    4
    Thanked 83 Times in 82 Posts
    This would definitely be an HTML/CSS issue so I will move it to the HTML forum.
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #4
    Regular Coder
    Join Date
    Jul 2004
    Location
    mile high city
    Posts
    482
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You should start by validating your markup.

    Post back if you need help sorting out the validation errors.
    Computer, kill Flanders... Did I hear my name? My ears are burning...
    Good start. Now finish the job.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •