Space between two tables

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • matheussousuke
    New Member
    • Sep 2009
    • 249

    Space between two tables

    HI, I did not know if should post this on HTML, or on PHP, cause that code is mixed. So I posted here.


    I'm having an issue with a website, a table is getting a lot of space from another.

    See the image, I put AT the image the part of the code that has the images





    and here is the code


    Code:
    <?php
    
    
    // check if the 'install' directory exists, and warn of its existence
      if (WARN_INSTALL_EXISTENCE == 'true') {
        if (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/install')) {
       $messageStack->add('header', WARNING_INSTALL_DIRECTORY_EXISTS, 'warning');   
        }
      }
    
    // check if the configure.php file is writeable
      if (WARN_CONFIG_WRITEABLE == 'true') {
        if ( (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) && (is_writeable(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) ) {
        $messageStack->add('header', WARNING_CONFIG_FILE_WRITEABLE, 'warning');   
        }
      }
    
    // check if the session folder is writeable
      if (WARN_SESSION_DIRECTORY_NOT_WRITEABLE == 'true') {
        if (STORE_SESSIONS == '') {
          if (!is_dir(tep_session_save_path())) {
            $messageStack->add('header', WARNING_SESSION_DIRECTORY_NON_EXISTENT, 'warning');
          } elseif (!is_writeable(tep_session_save_path())) {
            $messageStack->add('header', WARNING_SESSION_DIRECTORY_NOT_WRITEABLE, 'warning');
          }
        }
      }
    
    // check session.auto_start is disabled
      if ( (function_exists('ini_get')) && (WARN_SESSION_AUTO_START == 'true') ) {
        if (ini_get('session.auto_start') == '1') {
          $messageStack->add('header', WARNING_SESSION_AUTO_START, 'warning');
        }
      }
    
      if ( (WARN_DOWNLOAD_DIRECTORY_NOT_READABLE == 'true') && (DOWNLOAD_ENABLED == 'true') ) {
        if (!is_dir(DIR_FS_DOWNLOAD)) {
          $messageStack->add('header', WARNING_DOWNLOAD_DIRECTORY_NON_EXISTENT, 'warning');
        }
      }
    
      if ($messageStack->size('header') > 0) {
        echo $messageStack->output('header');
      }
    ?>
    <!-- start -->
    <?php
      if (isset($HTTP_GET_VARS['error_message']) && tep_not_null($HTTP_GET_VARS['error_message'])) {
    ?>
    <table border="0" width="100%" cellspacing="0" cellpadding="2">
      <tr class="headerError">
        <td class="headerError"><?php echo htmlspecialchars(stripslashes(urldecode($HTTP_GET_VARS['error_message']))); ?></td>
      </tr>
    </table>
    <?php
      }
    
      if (isset($HTTP_GET_VARS['info_message']) && tep_not_null($HTTP_GET_VARS['info_message'])) {
    ?>
    <table border="0" width="100%" cellspacing="0" cellpadding="2">
      <tr class="headerInfo">
        <td class="headerInfo"><?php echo htmlspecialchars(stripslashes(urldecode($HTTP_GET_VARS['info_message']))); ?></td>
      </tr>
    </table>
    <?php
      }
    ?>
    <!-- start -->
    <table cellpadding="0" cellspacing="0" border="0" align="center" class="width_table">
    	<tr><td class="width_td">
    		<table cellpadding="0" cellspacing="0" border="0" align="center">
    			<tr><td class="row_1">
    			
    				<table cellpadding="0" cellspacing="0" border="0"  class="wrapper_header_t">
    					<tr><td class="wrapper_header_l">
    						<table cellpadding="0" cellspacing="0" border="0" class="wrapper_header_b">
    							<tr><td class="wrapper_header_r">
    								<table cellpadding="0" cellspacing="0" border="0" class="wrapper_header_tl">
    									<tr><td class="wrapper_header_tr">
    										<table cellpadding="0" cellspacing="0" border="0" class="wrapper_header_bl">
    											<tr><td class="wrapper_header_br">
    				
    				<table cellpadding="0" cellspacing="0" border="0">
    					<tr>
    						<td class="logo" align="left">
    						
    						
    						<a href="<? print  tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_LOGO . 'logo.gif'); ?>
    						</a>
    						
    						</td>
    						
    						
    						
    						
    						<td>
    						
    						
    						<a href="http://matheusgrafix.com/index.php?option=com_wmtportfolio&Itemid=69">
    
    <img src="./images/Blue-Glow-Dreamy-Portrait.jpg" />	</td>
    						
    						
    						
    								
    						
    						<td style="vertical-align:middle; text-align:left">
    						
    			
    				
    			
    				
    				
    </a>
    				
    				
    				
    				
    				
    				
    						<table border="0" cellspacing="0" cellpadding="0" align="left" class="header">
    							<tr>
    						
    								<td align="left">
    			<table border="0" cellspacing="0" cellpadding="0" align="center" style="width:100%">
    				<tr><td>
    				
    				
    					
    
    							
    						
    
    
    				
    				
    				<?php
    				
    				
    	
    				
    				
    				
    				
    				
    				
    				
    				
    				/*
    				
    				 echo BOX_HEADING_CURRENCIES
    				 
    				 */
    				 ?>
    				 
    				</td><td style="width:100%;"><?
    				 
    				 /*
    				 
    				 echo tep_draw_form('currencies', tep_href_link(basename($PHP_SELF), '', $request_type, false), 'get');
    reset($currencies->currencies);
    $currencies_array = array();
    while (list($key, $value) = each($currencies->currencies)) {
    $currencies_array[] = array('id' => $key, 'text' => $value['title']);
    }
    $hidden_get_variables = '';
    reset($HTTP_GET_VARS);
    while (list($key, $value) = each($HTTP_GET_VARS)) {
    if ( ($key != 'currency') && ($key != tep_session_name()) && ($key != 'x') && ($key != 'y') ) {
    $hidden_get_variables .= tep_draw_hidden_field($key, $value);
    }
    }
    echo tep_draw_pull_down_menu('currency', $currencies_array, $currency, 'onChange="this.form.submit();" class="select"') . $hidden_get_variables . tep_hide_session_id();
    echo '</form>';
    
    */
    
    ?>
    
    
    </td>
    				</tr>
    			</table>
    								</td>
    								<td class="nav_separator"><?php echo tep_draw_separator('spacer.gif', '17', '1'); ?></td>
    								<td>
    	<table width="17" border="0" align="center" cellpadding="0" cellspacing="0" style="width:80px;">
    		<tr><td><?php
    		
    		
    		/*
    		
    		
    if (!isset($lng) || (isset($lng) && !is_object($lng))) {
    include(DIR_WS_CLASSES . 'language.php');
    $lng = new language;
    }
    $languages_string = '';
    reset($lng->catalog_languages);
    $i = 0; 
    while (list($key, $value) = each($lng->catalog_languages)) {
    if ($i)  $languages_string .= tep_image(DIR_WS_IMAGES.'spacer.gif','','','',' style="margin:0px 0px 0px 3px;"');
    $languages_string .= '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('language', 'currency')) . 'language=' . $key, $request_type) . '">' . tep_image(DIR_WS_LANGUAGES . $value['directory'] . '/images/' . $value['image'], $value['name'],'','','') . '</a>';
    $i++;
    }
    echo $languages_string;
    
    */
    
    
    ?></td>
    		</tr>
    	</table>
    								</td>
    								<td class="nav_separator"><?php echo tep_draw_separator('spacer.gif', '17', '1'); ?></td>
    								<td class="z1">
    				<table cellpadding="0" cellspacing="0" border="0">
    					<tr>
    						<td><b><?php echo BOX_HEADING_SHOPPING_CART;?></b><?php echo BOX_SHOPPING_NOW;?><a href="<?php echo tep_href_link('shopping_cart.php')?>"><?php echo $cart->count_contents()?> <?php echo BOX_SHOPPING_CART_EMPTY?></a></td>
    					</tr>
    				</table>
    								</td>
    							</tr>
    						</table>				
    
    																		
    						</td>	
    					</tr>
    				</table>
    
    											</td></tr>
    										</table>
    									</td></tr>
    								</table>
    							</td></tr>
    						</table>
    					</td></tr>
    				</table>
    				<table cellpadding="0" cellspacing="0" border="0"><tr><td style="padding:6px 6px 0px 6px;border-right:1px solid #cfcfcf;border-left:1px solid #cfcfcf; background:#ffffff;">
    				<table cellpadding="0" cellspacing="0" border="0" style="background:url(images/menu_bg.gif) 0px 0px repeat-x;">
    					<tr><td class="menu">
    						<table cellpadding="0" cellspacing="0" border="0">
    							<tr>
    <?php          
      switch($tab_sel){
       case 2:
    	$item_menu_01 = 'id="over_m1" onMouseOut="this.id=\'over_m1\';" onMouseOver="this.id=\'over_m1\';"';
    	$item_menu_02 = 'id="m2" onMouseOut="this.id=\'m2\';" onMouseOver="this.id=\'over_m2\';"';
    	$item_menu_03 = 'id="m3" onMouseOut="this.id=\'m3\';" onMouseOver="this.id=\'over_m3\';"';
    	$item_menu_04 = 'id="m4" onMouseOut="this.id=\'m4\';" onMouseOver="this.id=\'over_m4\';"';
    	$item_menu_05 = 'id="m5" onMouseOut="this.id=\'m5\';" onMouseOver="this.id=\'over_m5\';"';
    	$item_menu_06 = 'id="m6" onMouseOut="this.id=\'m6\';" onMouseOver="this.id=\'over_m6\';"';	
    	break;
    
       case 3:
    	$item_menu_01 = 'id="m1" onMouseOut="this.id=\'m1\';" onMouseOver="this.id=\'over_m1\';"';
    	$item_menu_02 = 'id="over_m2" onMouseOut="this.id=\'over_m2\';" onMouseOver="this.id=\'over_m2\';"';
    	$item_menu_03 = 'id="m3" onMouseOut="this.id=\'m3\';" onMouseOver="this.id=\'over_m3\';"';
    	$item_menu_04 = 'id="m4" onMouseOut="this.id=\'m4\';" onMouseOver="this.id=\'over_m4\';"';
    	$item_menu_05 = 'id="m5" onMouseOut="this.id=\'m5\';" onMouseOver="this.id=\'over_m5\';"';
    	$item_menu_06 = 'id="m6" onMouseOut="this.id=\'m6\';" onMouseOver="this.id=\'over_m6\';"';	
    	break;
    
       case 4:
    	$item_menu_01 = 'id="m1" onMouseOut="this.id=\'m1\';" onMouseOver="this.id=\'over_m1\';"';
    	$item_menu_02 = 'id="m2" onMouseOut="this.id=\'m2\';" onMouseOver="this.id=\'over_m2\';"';
    	$item_menu_03 = 'id="over_m3" onMouseOut="this.id=\'over_m3\';" onMouseOver="this.id=\'over_m3\';"';
    	$item_menu_04 = 'id="m4" onMouseOut="this.id=\'m4\';" onMouseOver="this.id=\'over_m4\';"';
    	$item_menu_05 = 'id="m5" onMouseOut="this.id=\'m5\';" onMouseOver="this.id=\'over_m5\';"';
    	$item_menu_06 = 'id="m6" onMouseOut="this.id=\'m6\';" onMouseOver="this.id=\'over_m6\';"';	
    	break;
    
       case 5:
    	$item_menu_01 = 'id="m1" onMouseOut="this.id=\'m1\';" onMouseOver="this.id=\'over_m1\';"';
    	$item_menu_02 = 'id="m2" onMouseOut="this.id=\'m2\';" onMouseOver="this.id=\'over_m2\';"';
    	$item_menu_03 = 'id="m3" onMouseOut="this.id=\'m3\';" onMouseOver="this.id=\'over_m3\';"';
    	$item_menu_04 = 'id="over_m4" onMouseOut="this.id=\'over_m4\';" onMouseOver="this.id=\'over_m4\';"';
    	$item_menu_05 = 'id="m5" onMouseOut="this.id=\'m5\';" onMouseOver="this.id=\'over_m5\';"';
    	$item_menu_06 = 'id="m6" onMouseOut="this.id=\'m6\';" onMouseOver="this.id=\'over_m6\';"';	
    	break;
    
       case 6:
    	$item_menu_01 = 'id="m1" onMouseOut="this.id=\'m1\';" onMouseOver="this.id=\'over_m1\';"';
    	$item_menu_02 = 'id="m2" onMouseOut="this.id=\'m2\';" onMouseOver="this.id=\'over_m2\';"';
    	$item_menu_03 = 'id="m3" onMouseOut="this.id=\'m3\';" onMouseOver="this.id=\'over_m3\';"';
    	$item_menu_04 = 'id="m4" onMouseOut="this.id=\'m4\';" onMouseOver="this.id=\'over_m4\';"';
    	$item_menu_05 = 'id="over_m5" onMouseOut="this.id=\'over_m5\';" onMouseOver="this.id=\'over_m5\';"';
    	$item_menu_06 = 'id="m6" onMouseOut="this.id=\'m6\';" onMouseOver="this.id=\'over_m6\';"';	
    	break;
    
       case 7:
    	$item_menu_01 = 'id="m1" onMouseOut="this.id=\'m1\';" onMouseOver="this.id=\'over_m1\';"';
    	$item_menu_02 = 'id="m2" onMouseOut="this.id=\'m2\';" onMouseOver="this.id=\'over_m2\';"';
    	$item_menu_03 = 'id="m3" onMouseOut="this.id=\'m3\';" onMouseOver="this.id=\'over_m3\';"';
    	$item_menu_04 = 'id="m4" onMouseOut="this.id=\'m4\';" onMouseOver="this.id=\'over_m4\';"';
    	$item_menu_05 = 'id="m5" onMouseOut="this.id=\'m5\';" onMouseOver="this.id=\'over_m5\';"';
    	$item_menu_06 = 'id="over_m6" onMouseOut="this.id=\'over_m6\';" onMouseOver="this.id=\'over_m6\';"';
    	break;
    
       default:
    	$item_menu_01 = 'id="m1" onMouseOut="this.id=\'m1\';" onMouseOver="this.id=\'over_m1\';"';
    	$item_menu_02 = 'id="m2" onMouseOut="this.id=\'m2\';" onMouseOver="this.id=\'over_m2\';"';
    	$item_menu_03 = 'id="m3" onMouseOut="this.id=\'m3\';" onMouseOver="this.id=\'over_m3\';"';
    
    	$item_menu_04 = 'id="m4" onMouseOut="this.id=\'m4\';" onMouseOver="this.id=\'over_m4\';"';
    	$item_menu_05 = 'id="m5" onMouseOut="this.id=\'m5\';" onMouseOver="this.id=\'over_m5\';"';
    	$item_menu_06 = 'id="m6" onMouseOut="this.id=\'m6\';" onMouseOver="this.id=\'over_m6\';"';
      }
    ?>            
    
    					<td <?php echo $item_menu_01;?> onClick="document.location='<?php echo tep_href_link('index.php')?>'" nowrap="nowrap"><? printf(BOX_MANUFACTURER_INFO_HOMEPAGE,"")?></td>
    					<td class="menu_separator"><?php echo tep_image(DIR_WS_IMAGES.'menu_separator.gif')?></td>
    					<td <?php echo $item_menu_02;?> onClick="document.location='<?php echo tep_href_link('products_new.php')?>'"><?php echo BOX_HEADING_WHATS_NEW?></td>
    					<td class="menu_separator"><?php echo tep_image(DIR_WS_IMAGES.'menu_separator.gif')?></td>
    					<td <?php echo $item_menu_03;?> onClick="document.location='<?php echo tep_href_link('specials.php')?>'"><?php echo BOX_HEADING_SPECIALS?></td>
    					<td class="menu_separator"><?php echo tep_image(DIR_WS_IMAGES.'menu_separator.gif')?></td>
    						
    <?php if (tep_session_is_registered('customer_id')) { 
    
    	 $acc_link = tep_href_link('account.php');
    	 $acc_title= HEADER_TITLE_MY_ACCOUNT;
    	} else{ 
    	 $acc_link = tep_href_link('create_account.php');
    	 $acc_title= HEADER_TITLE_CREATE_ACCOUNT;
    	} 
    ?>                        
    					<td <?php echo $item_menu_04;?> onClick="document.location='<?php echo $acc_link;?>'" nowrap="nowrap"><?php echo $acc_title;?></td>
    					<td class="menu_separator"><?php echo tep_image(DIR_WS_IMAGES.'menu_separator.gif')?></td>
    <?php if (tep_session_is_registered('customer_id')) { 
    
    	 $login_link = tep_href_link('logoff.php');
    	 $login_title= HEADER_TITLE_LOGOFF;
    	} else{ 
    	 $login_link = tep_href_link('login.php');
    	 $login_title= HEADER_TITLE_LOGIN;
    	} 
    ?>                     
    					<td <?php echo $item_menu_05;?> onClick="document.location='<?php echo $login_link;?>'"><?php echo $login_title;?></td>
    					<td class="menu_separator"><?php echo tep_image(DIR_WS_IMAGES.'menu_separator.gif')?></td>
    					<td <?php echo $item_menu_06;?> onClick="document.location='<?php echo tep_href_link('contact_us.php')?>'"><?php echo BOX_INFORMATION_CONTACT?></td>
    					<td class="menu_separator"><?php echo tep_image(DIR_WS_IMAGES.'menu_separator.gif')?></td>
    					</tr>
    				</table>
    					</td>
    					
    					<td class="search">
    					<?php echo tep_draw_form('search',tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false),'get') ?>
    						<table border="0" cellspacing="0" cellpadding="0" align="right" style="width:176px; margin-bottom:0px;">
    						<tr>
    							<td style="vertical-align:top;"><?php echo tep_image(DIR_WS_IMAGES.'search_bg2.gif')?></td>
    							<td style="width:100%;background:url(images/search_bg22.gif) 0px 0px repeat-x;">
    								<table cellpadding="0" cellspacing="0" border="0">
    									<tr><td style="height:21px;"><input type=text name="keywords" class="go" value=""></td></tr>
    								</table>
    							</td>
    							<td style="vertical-align:top; padding-right:5px;"><?php echo tep_image(DIR_WS_IMAGES.'search_bg222.gif')?></td>
    							<td style="vertical-align:top;"><?php echo tep_image(DIR_WS_IMAGES.'search_bg3.gif')?></td>
    							<td style="background:url(images/search_bg33.gif) 100% 0px repeat-x;height:21px;"><?php echo tep_image_submit('button_search_prod.gif', '', '')?></td><td style="vertical-align:top;"><?php echo tep_image(DIR_WS_IMAGES.'search_bg333.gif')?></td>
    						</tr>
    						</table></form>                                        
    					</td></tr>
    				</table>
    				</td></tr></table>
    			</td></tr>
    			<tr><td class="row_2">





    I tried all kind of stuff to make those table loose that space, but I can't understand what's going on, is that because of the php?


    I just wanna get the image the is on the middle, and bring it to the left side, nearby the logo.


    Thank you for your patron

    cheers
  • Atli
    Recognized Expert Expert
    • Nov 2006
    • 5062

    #2
    That is a LOT of tables! You really should avoid using tables for layouts. It's an obsolete technique. You should especially avoid nesting tables. That's a nightmare to control.

    That said, have you validated your HTML? Even the most minor error in your HTML could cause something like that.

    A problem like this would not be caused by PHP, but rather the output PHP generates. It would be better to see the generated output rather than the PHP-infused HTML.

    Comment

    • matheussousuke
      New Member
      • Sep 2009
      • 249

      #3
      Trouble is.... this is a oscommerce template, It was kind hard to change the template, once that the other one had a lot of modifications that could not be undone.

      I will try the output stuff, thx

      Comment

      • matheussousuke
        New Member
        • Sep 2009
        • 249

        #4
        I'm trying, how do I do that with Dreamweaver???? ????????

        Comment

        • Atli
          Recognized Expert Expert
          • Nov 2006
          • 5062

          #5
          Open your site in Firefox, right-click and do "View page source".

          Comment

          Working...