Problems with cells and pics in it

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
gobby
Forum Newbie
Posts: 2
Joined: Thu Oct 09, 2003 6:45 am

Problems with cells and pics in it

Post by gobby »

Well, I hope it is the correct forum ;o) (not that its a html prob)

I want to set a few images in a row to use it as navigation. with the php in it I get different pics in different status. The problem is that there is a thin (2-3pixels) line UNDER the Buttonpictures that I am not able to remove. I know now that my cell height is changed by starting the php script. You'll know what I mean if you look here:
http://www.mcsberlin.de/new/mainframe.php
Has anyone an idea? I'm on it for days now and I'm afraid I cannot fix it. Probably it is just the html thing...I don't know. here is the code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Unbenanntes Dokument</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
img {
border: 0px none;
}
-->
</style>
</head>

<body>
<table width="716" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="56" height="38" valign="down"><!--DWLayoutEmptyCell-->&nbsp;</td>
<td width="110" height="38" valign="down" nowrap><a href="mainframe.php?seite=aktuelles">
<?php
switch ($seite){
case aktuelles:{echo "<img src=media/pictures/menue/option/button_aktuelles_normal.gif width=110 height=38>"; break;}
case produkte:{echo "<img src=media/pictures/menue/option/button_aktuelles_disabled.gif width=110 height=38>"; break;}
case partner:{echo "<img src=media/pictures/menue/option/button_aktuelles_disabled.gif width=110 height=38>"; break;}
case support:{echo "<img src=media/pictures/menue/option/button_aktuelles_disabled.gif width=110 height=38>"; break;}
case ueberuns:{echo "<img src=media/pictures/menue/option/button_aktuelles_disabled.gif width=110 height=38>"; break;}
case kontakt:{echo "<img src=media/pictures/menue/option/button_aktuelles_disabled.gif width=110 height=38>"; break;}
case home:{ echo "<img src=media/pictures/menue/option/button_aktuelles_normal.gif width=110 height=38>"; break;}
default:{ echo "<img src=media/pictures/menue/option/button_aktuelles_normal.gif width=110 height=38>"; break;}}
?>
</a></td>
<td width="110" height="38" valign="down" align="left" nowrap><a href="mainframe.php?seite=produkte">
<?php
switch ($seite){
case aktuelles:{echo "<img src=media/pictures/menue/option/button_produkte_disabled.gif width=110 height=38>"; break;}
case produkte:{echo "<img src=media/pictures/menue/option/button_produkte_normal.gif width=110 height=38>"; break;}
case partner:{echo "<img src=media/pictures/menue/option/button_produkte_disabled.gif width=110 height=38>"; break;}
case support:{echo "<img src=media/pictures/menue/option/button_produkte_disabled.gif width=110 height=38>"; break;}
case ueberuns:{echo "<img src=media/pictures/menue/option/button_produkte_disabled.gif width=110 height=38>"; break;}
case kontakt:{echo "<img src=media/pictures/menue/option/button_produkte_disabled.gif width=110 height=38>"; break;}
case home:{ echo "<img src=media/pictures/menue/option/button_produkte_normal.gif width=110 height=38>"; break;}
default:{ echo "<img src=media/pictures/menue/option/button_produkte_normal.gif width=110 height=38>"; break;}}
?>
</a></td>
<td width="110" height="38" valign="down" align="left" nowrap><A href="mainframe.php?seite=partner">
<?php
switch ($seite){
case aktuelles:{echo "<img src=media/pictures/menue/option/button_partner_disabled.gif width=110 height=38>"; break;}
case produkte:{echo "<img src=media/pictures/menue/option/button_partner_disabled.gif width=110 height=38>"; break;}
case partner:{echo "<img src=media/pictures/menue/option/button_partner_normal.gif width=110 height=38>"; break;}
case support:{echo "<img src=media/pictures/menue/option/button_partner_disabled.gif width=110 height=38>"; break;}
case ueberuns:{echo "<img src=media/pictures/menue/option/button_partner_disabled.gif width=110 height=38>"; break;}
case kontakt:{echo "<img src=media/pictures/menue/option/button_partner_disabled.gif width=110 height=38>"; break;}
case home:{ echo "<img src=media/pictures/menue/option/button_partner_normal.gif width=110 height=38>"; break;}
default:{ echo "<img src=media/pictures/menue/option/button_partner_normal.gif width=110 height=38>"; break;}}
?>
</a></td>
<td width="110" height="38" valign="down" align="left" nowrap><A href="mainframe.php?seite=support">
<?php
switch ($seite){
case aktuelles:{echo "<img src=media/pictures/menue/option/button_support_disabled.gif width=110 height=38>"; break;}
case produkte:{echo "<img src=media/pictures/menue/option/button_support_disabled.gif width=110 height=38>"; break;}
case partner:{echo "<img src=media/pictures/menue/option/button_support_disabled.gif width=110 height=38>"; break;}
case support:{echo "<img src=media/pictures/menue/option/button_support_normal.gif width=110 height=38>"; break;}
case ueberuns:{echo "<img src=media/pictures/menue/option/button_support_disabled.gif width=110 height=38>"; break;}
case kontakt:{echo "<img src=media/pictures/menue/option/button_support_disabled.gif width=110 height=38>"; break;}
case home:{ echo "<img src=media/pictures/menue/option/button_support_normal.gif width=110 height=38>"; break;}
default:{ echo "<img src=media/pictures/menue/option/button_support_normal.gif width=110 height=38>"; break;}}
?>
</a></td>
<td width="110" height="38" valign="down" align="left" nowrap><A href="mainframe.php?seite=ueberuns">
<?php
switch ($seite){
case aktuelles:{echo "<img src=media/pictures/menue/option/button_ueberuns_disabled.gif width=110 height=38>"; break;}
case produkte:{echo "<img src=media/pictures/menue/option/button_ueberuns_disabled.gif width=110 height=38>"; break;}
case partner:{echo "<img src=media/pictures/menue/option/button_ueberuns_disabled.gif width=110 height=38>"; break;}
case support:{echo "<img src=media/pictures/menue/option/button_ueberuns_disabled.gif width=110 height=38>"; break;}
case ueberuns:{echo "<img src=media/pictures/menue/option/button_ueberuns_normal.gif width=110 height=38>"; break;}
case kontakt:{echo "<img src=media/pictures/menue/option/button_ueberuns_disabled.gif width=110 height=38>"; break;}
case home:{ echo "<img src=media/pictures/menue/option/button_ueberuns_normal.gif width=110 height=38>"; break;}
default:{ echo "<img src=media/pictures/menue/option/button_ueberuns_normal.gif width=110 height=38>"; break;}}
?>
</a></td>
<td width="110" height="38" valign="down" align="left" nowrap><A href="mainframe.php?seite=kontakt">
<?php
switch ($seite){
case aktuelles:{echo "<img src=media/pictures/menue/option/button_kontakt_disabled.gif width=110 height=38>"; break;}
case produkte:{echo "<img src=media/pictures/menue/option/button_kontakt_disabled.gif width=110 height=38>"; break;}
case partner:{echo "<img src=media/pictures/menue/option/button_kontakt_disabled.gif width=110 height=38>"; break;}
case support:{echo "<img src=media/pictures/menue/option/button_kontakt_disabled.gif width=110 height=38>"; break;}
case ueberuns:{echo "<img src=media/pictures/menue/option/button_kontakt_disabled.gif width=110 height=38>"; break;}
case kontakt:{echo "<img src=media/pictures/menue/option/button_kontakt_normal.gif width=110 height=38>"; break;}
case home:{ echo "<img src=media/pictures/menue/option/button_kontakt_normal.gif width=110 height=38>"; break;}
default:{ echo "<img src=media/pictures/menue/option/button_kontakt_normal.gif width=110 height=38>"; break;}}
?>
</a></td>
<td width="1">&nbsp;</td>
</tr>
<tr>
<td height="28" width="715" colspan="7" align="left" valign="top" nowrap>
<?php
switch ($seite){
case aktuelles:{echo "<img src=media/pictures/menue/unterlinie_fuer_1.gif height=28 width=715>"; break;}
case produkte:{echo "<img src=media/pictures/menue/unterlinie_fuer_2.gif height=28 width=715>"; break;}
case partner:{echo "<img src=media/pictures/menue/unterlinie_fuer_3.gif height=28 width=715>"; break;}
case support:{echo "<img src=media/pictures/menue/unterlinie_fuer_4.gif height=28 width=715>"; break;}
case ueberuns:{echo "<img src=media/pictures/menue/unterlinie_fuer_5.gif height=28 width=715>"; break;}
case kontakt:{echo "<img src=media/pictures/menue/unterlinie_fuer_6.gif height=28 width=715>"; break;}
case home:{ echo "<img src=media/pictures/menue/unterlinie_fuer_0.gif height=28 width=715>"; break;}
default:{ echo "<img src=media/pictures/menue/unterlinie_fuer_0.gif height=28 width=715>"; break;}}
?>
</td>
<td>&nbsp;</td>
</tr>
</table>
</body>
</html>
matthiasone
Forum Contributor
Posts: 117
Joined: Mon Jul 22, 2002 12:14 pm
Location: Texas, USA
Contact:

Post by matthiasone »

Can you post the URL so I can look at it?
Gen-ik
DevNet Resident
Posts: 1059
Joined: Mon Aug 12, 2002 7:08 pm
Location: London. UK.

Post by Gen-ik »

Check the HTML after the page has been rendered and then check to make sure there are no spaces before or after the images.

You want it to look like this... <a href=""><img src=""></a>
not like this... <a href=""> <img src=""> </a>

And also add a margin:0px; to your image style as well.... just in case.
microthick
Forum Regular
Posts: 543
Joined: Wed Sep 24, 2003 2:15 pm
Location: Vancouver, BC

Post by microthick »

Gen-ik is right with what he said. But that's often not enough to get rid of ALL of the white space errors.

You can also get white space between your images if there are no spaces before and after your <img> tags. This can happen if you have spaces between <tr> and <td> tags (and </td> and </tr>), and even between successive </tr> and <tr> tags, etc.
gobby
Forum Newbie
Posts: 2
Joined: Thu Oct 09, 2003 6:45 am

Well

Post by gobby »

Thanks a lot fot the replies...I put all the code in just one single php section and the spaces were gone. Don't know why but thats all right for the moment.

til the next white spacer ;O)
Post Reply