Jump to content

Archived

This topic is now archived and is closed to further replies.

djmonkey1

HTML display problem

Recommended Posts

Hello all-

 

I've been working on re-formatting my create_account.php page. All I'm trying to do is to have all the entry boxes line up in one neat little column; as such I've done away with many of the tables in this page so that everything from "Your Personal Details" down through the "Continue" button is in one table, with two columns per row.

 

You can see it in my sandbox at

 

http://www.besttestsite.com/create_account.php

 

Unfortunately you can also see that the formatting of the page is wrong. The width of the header and body text tables is too wide- it is set at 740 pixels in the code for the page but something I did broke the formatting of the display.

 

I've gone over it with a fine tooth comb many times and found nothing wrong, to my eyes, with the HTML of the page, yet the problem persists.

 

Here is the HTML portion of my create_account.php file:

 

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html <?php echo HTML_PARAMS; ?>>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
 <title><?php echo TITLE; ?></title>
 <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
 <link rel="stylesheet" type="text/css" href="stylesheet.css">
 <?php require('includes/form_check.js.php'); ?>
 </head>
 <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
 <!-- header //--><div align="center"><table width="740"><tr><td><!-- header //-->
 <?php require(DIR_WS_INCLUDES . 'header.php'); ?>
 <!-- header_eof //-->

 <!-- body //-->
 <table border="0" width="100%" cellspacing="3" cellpadding="3">
<tr>
  <td width="<?php echo BOX_WIDTH; ?>" valign="top">
  <table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
 <!-- left_navigation //-->
 <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
 <!-- left_navigation_eof //-->
  </table></td>
 <!-- body_text //-->
  <td width="100%" valign="top">
 <?php echo tep_draw_form('create_account', tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'), 'post', 'onSubmit="return check_form(create_account);"') . tep_draw_hidden_field('action', 'process'); ?>
  <table border="0" width="100%" cellspacing="0" cellpadding="0">
	<tr>
	  <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
		   </tr>
		 <tr>
	 <td><?php echo tep_draw_separator('pixel_trans.gif', '', '10'); ?></td>
	</tr>
	<tr>
	 <td class="smallText"><br><?php echo sprintf(TEXT_ORIGIN_LOGIN, tep_href_link(FILENAME_LOGIN, tep_get_all_get_params(), 'SSL')); ?></td>
	</tr>
	<tr>
	 <td><?php echo tep_draw_separator('pixel_trans.gif', '', '10'); ?></td>
	</tr>
 <?php
if ($messageStack->size('create_account') > 0) {
 ?>
	<tr>
	 <td><?php echo $messageStack->output('create_account'); ?></td>
	</tr>
	<tr>
	 <td><?php echo tep_draw_separator('pixel_trans.gif', '', '10'); ?></td>
	</tr>
 <?php
}
 ?>
	<tr>
	  <td>
	 <!-- The table below is the table used for the entry boxes. Every row should have two columns.-->
	  <table border="0" width="500" cellspacing="0" cellpadding="2" class="infoBox">
		<tr>
		 <td class="main"><b><?php echo CATEGORY_PERSONAL; ?></b></td>
		<td class="inputRequirement"><?php echo FORM_REQUIRED_INFORMATION; ?></td>
		</tr>


		  <?php
if (ACCOUNT_GENDER == 'true') {
 ?>
 <tr class="infoBoxContents">
			 <td class="main"><?php echo ENTRY_GENDER; ?></td>
			 <td class="main"><?php echo tep_draw_radio_field('gender', 'm') . '  ' . MALE . '  ' . tep_draw_radio_field('gender', 'f') . '  ' . FEMALE . ' ' . (tep_not_null(ENTRY_GENDER_TEXT) ? '<span class="inputRequirement">' . ENTRY_GENDER_TEXT . '</span>': ''); ?></td>
		  </tr>  
 <?php
}
 ?>
			<tr class="infoBoxContents">
			 <td class="main"><?php echo ENTRY_FIRST_NAME; ?></td>
			 <td class="main"><?php echo tep_draw_input_field('firstname') . ' ' . (tep_not_null(ENTRY_FIRST_NAME_TEXT) ? '<span class="inputRequirement">' . ENTRY_FIRST_NAME_TEXT . '</span>': ''); ?></td>
			</tr>
			<tr class="infoBoxContents">
			 <td class="main"><?php echo ENTRY_LAST_NAME; ?></td>
			 <td class="main"><?php echo tep_draw_input_field('lastname') . ' ' . (tep_not_null(ENTRY_LAST_NAME_TEXT) ? '<span class="inputRequirement">' . ENTRY_LAST_NAME_TEXT . '</span>': ''); ?></td>
			</tr>
 <?php
if (ACCOUNT_DOB == 'true') {
 ?>
			<tr class="infoBoxContents">
			 <td class="main"><?php echo ENTRY_DATE_OF_BIRTH; ?></td>
			 <td class="main"><?php echo tep_draw_input_field('dob') . ' ' . (tep_not_null(ENTRY_DATE_OF_BIRTH_TEXT) ? '<span class="inputRequirement">' . ENTRY_DATE_OF_BIRTH_TEXT . '</span>': ''); ?></td>
			</tr>
 <?php
}
 ?>
			<tr class="infoBoxContents">
			 <td class="main"><?php echo ENTRY_EMAIL_ADDRESS; ?></td>
			 <td class="main"><?php echo tep_draw_input_field('email_address') . ' ' . (tep_not_null(ENTRY_EMAIL_ADDRESS_TEXT) ? '<span class="inputRequirement">' . ENTRY_EMAIL_ADDRESS_TEXT . '</span>': ''); ?></td>
			</tr>

 <?php
if (ACCOUNT_COMPANY == 'true') {
 ?>
	<tr>
	 <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
	  <td> </td>
	</tr>
	<tr>
	 <td class="main"><b><?php echo CATEGORY_COMPANY; ?></b></td>
	  <td> </td>
	</tr>
	<tr>
			 <td class="main"><?php echo ENTRY_COMPANY; ?></td>
			 <td class="main"><?php echo tep_draw_input_field('company') . ' ' . (tep_not_null(ENTRY_COMPANY_TEXT) ? '<span class="inputRequirement">' . ENTRY_COMPANY_TEXT . '</span>': ''); ?></td>
			</tr>
 <!-- BOF Separate Pricing Per Customer: field for tax id number -->
			<tr>
			 <td class="main"><?php echo ENTRY_COMPANY_TAX_ID; ?></td>
			 <td class="main"><?php echo tep_draw_input_field('company_tax_id') . ' ' . (tep_not_null(ENTRY_COMPANY_TAX_ID_TEXT) ? '<span class="inputRequirement">' . ENTRY_COMPANY_TAX_ID_TEXT . '</span>': ''); ?></td>
			</tr>
 <!-- EOF Separate Pricing Per Customer: field for tax id number -->

 <?php
}
 ?>
	<tr>
	 <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
	  <td> </td>
	</tr>
	<tr>
	 <td class="main"><b><?php echo CATEGORY_ADDRESS; ?></b></td>
	  <td> </td>
	</tr>
	<tr>

			 <td class="main"><?php echo ENTRY_STREET_ADDRESS; ?></td>
			 <td class="main"><?php echo tep_draw_input_field('street_address') . ' ' . (tep_not_null(ENTRY_STREET_ADDRESS_TEXT) ? '<span class="inputRequirement">' . ENTRY_STREET_ADDRESS_TEXT . '</span>': ''); ?></td>
			</tr>
 <?php
if (ACCOUNT_SUBURB == 'true') {
 ?>
			<tr>
			 <td class="main"><?php echo ENTRY_SUBURB; ?></td>
			 <td class="main"><?php echo tep_draw_input_field('suburb') . ' ' . (tep_not_null(ENTRY_SUBURB_TEXT) ? '<span class="inputRequirement">' . ENTRY_SUBURB_TEXT . '</span>': ''); ?></td>
			</tr>
 <?php
}
 ?>

			<tr>
			 <td class="main"><?php echo ENTRY_CITY; ?></td>
			 <td class="main"><?php echo tep_draw_input_field('city') . ' ' . (tep_not_null(ENTRY_CITY_TEXT) ? '<span class="inputRequirement">' . ENTRY_CITY_TEXT . '</span>': ''); ?></td>
			</tr>
 <?php
if (ACCOUNT_STATE == 'true') {
 ?>
			<tr>
			 <td class="main"><?php echo ENTRY_STATE; ?></td>
			  <td class="main">
 <?php
 // +Country-State Selector
	  $zones_array = array();
	  $zones_query = tep_db_query("select zone_id, zone_name from " . TABLE_ZONES . " where zone_country_id = " . (int)$country . " order by zone_name");
	  while ($zones_values = tep_db_fetch_array($zones_query)) {
	   $zones_array[] = array('id' => $zones_values['zone_id'], 'text' => $zones_values['zone_name']);
	  }
	  if (count($zones_array) > 0) {
		echo tep_draw_pull_down_menu('zone_id', $zones_array);
	  } else {
		echo tep_draw_input_field('state');
	  }
 // -Country-State Selector
 if (tep_not_null(ENTRY_STATE_TEXT)) echo ' <span class="inputRequirement">' . ENTRY_STATE_TEXT;

 ?>
			  </td>
			</tr>
 <?php
}
 ?>
			<tr>
			 <td class="main"><?php echo ENTRY_POST_CODE; ?></td>
			 <td class="main"><?php echo tep_draw_input_field('postcode') . ' ' . (tep_not_null(ENTRY_POST_CODE_TEXT) ? '<span class="inputRequirement">' . ENTRY_POST_CODE_TEXT . '</span>': ''); ?></td>
			</tr>
			<tr>
			 <td class="main"><?php echo ENTRY_COUNTRY; ?></td>
			  <?php // +Country-State Selector ?>
			 <td class="main"><?php echo tep_get_country_list('country',$country,'onChange="return refresh_form(create_account);"') . ' ' . (tep_not_null(ENTRY_COUNTRY_TEXT) ? '<span class="inputRequirement">' . ENTRY_COUNTRY_TEXT . '</span>': ''); ?></td>
			  <?php // -Country-State Selector ?>
			</tr>

	<tr>
	 <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
	  <td> </td>
	</tr>
	<tr>
	 <td class="main"><b><?php echo CATEGORY_CONTACT; ?></b></td>
	  <td> </td>
	</tr>
	<tr>

			 <td class="main"><?php echo ENTRY_TELEPHONE_NUMBER; ?></td>
			 <td class="main"><?php echo tep_draw_input_field('telephone') . ' ' . (tep_not_null(ENTRY_TELEPHONE_NUMBER_TEXT) ? '<span class="inputRequirement">' . ENTRY_TELEPHONE_NUMBER_TEXT . '</span>': ''); ?></td>
			</tr>
			<tr>
			 <td class="main"><?php echo ENTRY_FAX_NUMBER; ?></td>
			 <td class="main"><?php echo tep_draw_input_field('fax') . ' ' . (tep_not_null(ENTRY_FAX_NUMBER_TEXT) ? '<span class="inputRequirement">' . ENTRY_FAX_NUMBER_TEXT . '</span>': ''); ?></td>

	</tr>
	<tr>
	 <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
	  <td> </td>
	</tr>
	<tr>
	 <td class="main"><b><?php echo CATEGORY_OPTIONS; ?></b></td>
	  <td> </td>
	</tr>
	<tr>

			 <td class="main"><?php echo ENTRY_NEWSLETTER; ?></td>
			 <td class="main"><?php echo tep_draw_checkbox_field('newsletter', '1') . ' ' . (tep_not_null(ENTRY_NEWSLETTER_TEXT) ? '<span class="inputRequirement">' . ENTRY_NEWSLETTER_TEXT . '</span>': ''); ?></td>
			</tr>

	<tr>
	 <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
	  <td> </td>
	</tr>
	<tr>
	 <td class="main"><b><?php echo CATEGORY_PASSWORD; ?></b></td>
	  <td> </td>
	</tr>
	<tr>

			 <td class="main"><?php echo ENTRY_PASSWORD; ?></td>
			 <td class="main"><?php echo tep_draw_password_field('password') . ' ' . (tep_not_null(ENTRY_PASSWORD_TEXT) ? '<span class="inputRequirement">' . ENTRY_PASSWORD_TEXT . '</span>': ''); ?></td>
			</tr>
			<tr>
			 <td class="main"><?php echo ENTRY_PASSWORD_CONFIRMATION; ?></td>
			 <td class="main"><?php echo tep_draw_password_field('confirmation') . ' ' . (tep_not_null(ENTRY_PASSWORD_CONFIRMATION_TEXT) ? '<span class="inputRequirement">' . ENTRY_PASSWORD_CONFIRMATION_TEXT . '</span>': ''); ?></td>

	</tr>
	<tr>
	 <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
	  <td>  </td>
	</tr>

	<tr>


			  <td> </td>
			 <td><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td>

	</tr>
	 <tr>
	 <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
	  <td>  </td>
	</tr>

  </table>
  <!-- Here we have ended the entry box table. -->
  </td>
 </tr>
 </table></form>

 <!-- body_eof //-->

 <!-- footer //-->
 <?php include(DIR_WS_INCLUDES . 'footer.php'); ?>
 <!-- footer_eof //-->
 <br></td></tr></table>
 </td></tr></table></div>
 </body>
 </html>

 

I've checked the header and the footer as well and I don't see any problems there. I've also checked the html code that is output for the page and it looks ok- once again, every tag is opened and closed in the proper order.

 

If someone could take a look at this and let me know what it is I'm doing wrong, I'd greatly appreciate it. This is driving me nuts.....

 

Cheers,

Stew


Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Share this post


Link to post
Share on other sites

That's only the html portion of the page, but I figured it out. Instead of nesting the table for the entry boxes inside the table for the heading title, I put it in it's own table underneath the one for the heading title.

 

Thanks for looking at it for me!

 

Stew


Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Share this post


Link to post
Share on other sites

×