Jump to content

[SOLVED] Table weirdness in Opera 9.23 (CSS and XHTML validated)


jenp

Recommended Posts

Hi all :)

 

This may or may not be a PHP thing, but it's definitely got me scratching my head!  I've got a page created by PHP that uses a table to display contact data, research information and a photo (if available) of our faculty members... I've validated the file as XHTML 1.0 Transitional and CSS 3.  It displays absolutely fine in IE 5.5, 6, and 7; Firefox 2.0.0.11; Safari 3.03 for Windows; and Safari for Mac (I'm not near that machine, though, so I can't tell you which version - I'm running OS 10.5 on it, though), but Opera 9.23 for Windows insists on splitting the table into two 50% segments, which stretches the cell holding the picture far too widely and causes the text in the first cell to go onto 2 lines...  The URL is:

 

URL removed by admin at author's request

 

I've pasted the (most) relevent bit of code below... I've also set the table border to 1 at the minute (it helps me figure out what the table is doing, anyway!).  Things I've tried already:  setting a width on both cells (singly or both together); again - works in all the other browsers, but not in Opera.  I've tried taking out the table width and setting it to something different, but that doesn't help either.  I've chucked a test table containing the same information as one of the sets of data into the same div (though in the header  document rather than the PHP document) and that one seems fine..

 

I've checked after various sets of changes to make sure I don't have a dodgy cached page; I've turned off the proxy connection, cleared the cache... no change at all, no matter what I do.  Other stuff that might affect it:  I've got a container that's set to 760px wide and the table resides in that

 

Can anyone see where I might have gone wrong?

 

	print ("<table width=\"96%\" border=\"1\" cellspacing=\"4\" cellpadding=\"1\">");

	while (list($id,$title,$surname,$firstname,$college,$email,$website,$research,$supervision,$lookupid) = fgetcsv($Open, 10240, "|"))
	{
	/* Set up variable for photo */
	$photo = "./images/".$id.".jpg";
	/* Truncate research interests for display in list and convert special characters to html */
	$restrunc = trunc($research, 100);
	$college = htmlentities($college, ENT_QUOTES);
	/* print the html code that will display the data. */
                              print ("<tr>");
                              print ("<td colspan=\"2\" align=\"center\"><hr class=\"faculty\" noshade=\"noshade\" size=\"1%\" /></td>");
                              print ("</tr>");
	    print ("<tr align=\"left\" valign=\"top\">");
	    print ("<td><strong><a href=\"detail.php?id=$id\">");
	             if (!empty($title)) {
		print ("$title");
		}

		if (!empty($firstname)) {
		print (" $firstname");
		}

		if (!empty($surname)) {
		print (" $surname");
		}

	print ("</a></strong>");

	if (!empty($college)) {
	print (", $college ");
	}

	if (!empty($email)) {
	print ("     <a href=\"mailto:$email\">$email</a>");
	} 

	print("</td>");

	/* If there's no photo, don't give us a broken image */
	if(file_exists($photo))
	{
	  print ("<td valign=\"middle\" align=\"center\" rowspan=\"2\"><img src=\"$photo\" alt=\"$title $firstname $surname\" height=\"50\" /></td>");
	} else {
		print ("<td valign=\"middle\" align=\"center\" rowspan=\"2\"><img src=\"images/nophoto1.gif\" alt=\"No photo: $title $firstname $surname\" height=\"50\" /></td>");
	}
	print ("</tr>");

	if (!empty($restrunc)) {
		print ("<tr><td>$restrunc</td></tr>");
	} else {
		print ("<tr><td> </td></tr>");
		}
	}

fclose ($Open);
}	
	print ("</table>");

 

Thanks :)

 

-Jen

Link to comment
Share on other sites

It's definitely a bug with Opera for Windows (versions 9.23, 9.25 and 9.5 beta; I wasn't able to test on anything earlier).  The 9.5 Beta for Linux doesn't have the same problem (though 9.23 and 9.25 do).  I've reported it to the Opera dev group... So I guess I'll just leave it at that. :)

 

-Jen

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.