Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

I just can not get this table to work for me


lindsayanng

Recommended Posts

I have been messing with this table soo much that i think that it has gotten the best of me..

 

here is the link to my site:

Furry Family

 

At the top, you see the breadcrumb and the login form that is now aligned right.. I got the forgot password part to the outside of the orange table, which i wanted, but i CAN NOT get those email and password form to display on the same line.. I THOUGHT i was getting better at tables, but it just was NOT working!! I read about.com articles on how to make an html table,a nd a few other sites, but i just CAN NOT figure this one out.

 

If youw ould take a look, i would be very greatful

 

Here is the ENTIRE code for that table from begining to end

 

<table border="0" width="100%" cellspacing="0" cellpadding="1">
 <tr class="headerNavigation">
<td class="headerNavigation">  <?php echo $breadcrumb->trail(' » '); ?></td>
<?php
// added for loginbox
 if ( (basename($PHP_SELF) != FILENAME_LOGIN) && (basename($PHP_SELF) !=  FILENAME_CREATE_ACCOUNT) && !tep_session_is_registered('customer_id')) {
 if (!tep_session_is_registered('customer_id')) {

?>
<!-- loginbox //-->
<td align="right"><?php echo tep_draw_form('login', tep_href_link(FILENAME_LOGIN, 'action=process', 'SSL')); ?>  
</td>

<td class="smalltext" colspan="2">
<?php echo BOX_LOGINBOXH_EMAIL; ?>
<?php echo tep_draw_input_field('email_address'); ?>

<?php echo BOX_LOGINBOXH_PASSWORD; ?>
		<?php echo tep_draw_password_field('password'); ?>
		  <?php echo tep_image_submit('button_go.gif', IMAGE_BUTTON_LOGIN); ?></tr></td>
<tr class="header"><td align="right" class="smallText" width="100%"><?php echo '<a href="' . tep_href_link(FILENAME_PASSWORD_FORGOTTEN, '', 'SSL') . '">' . BOX_LOGINBOXH_FORGOT_PASSWORD . '</a>'; ?>
<?php echo BOX_LOGINBOXH_TEXT_NEW . ' ' . '<a href="' . tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL') . '">' . BOX_LOGINBOXH_NEW . '</a>'; ?>
 </tr>
</tr></table></td> 
 </table></form></td>

 

i feel soo dumb

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

try this:

 

<table border="0" width="100%" cellspacing="0" cellpadding="1">
 <tr class="headerNavigation">
<td class="headerNavigation">  <?php echo $breadcrumb->trail(' » '); ?></td>
<?php
// added for loginbox
 if ( (basename($PHP_SELF) != FILENAME_LOGIN) && (basename($PHP_SELF) !=  FILENAME_CREATE_ACCOUNT) && !tep_session_is_registered('customer_id')) {
 if (!tep_session_is_registered('customer_id')) {

?>
<!-- loginbox //-->
<td align="right"><?php echo tep_draw_form('login', tep_href_link(FILENAME_LOGIN, 'action=process', 'SSL')); ?>  
</td>

<td class="smalltext" colspan="2">
<?php echo BOX_LOGINBOXH_EMAIL; ?>
<?php echo tep_draw_input_field('email_address'); ?>

<?php echo BOX_LOGINBOXH_PASSWORD; ?>
		<?php echo tep_draw_password_field('password'); ?>
		  <?php echo tep_image_submit('button_go.gif', IMAGE_BUTTON_LOGIN); ?></tr></td>
<tr class="header"><td colspan="4" align="right" class="smallText" width="100%"><?php echo '<a href="' . tep_href_link(FILENAME_PASSWORD_FORGOTTEN, '', 'SSL') . '">' . BOX_LOGINBOXH_FORGOT_PASSWORD . '</a>'; ?>
<?php echo BOX_LOGINBOXH_TEXT_NEW . ' ' . '<a href="' . tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL') . '">' . BOX_LOGINBOXH_NEW . '</a>'; ?>
 </tr>
</tr></table></td>
 </table></form></td>

 

Top row has 4 cells ... bottom only has 1 ... so I added a colspan="4" in bottom row cell.. lemme know how u go :)

 

OR

 

you dont need top row to have colspan="2" for the email and password box ... try this one instead:

 

<table border="0" width="100%" cellspacing="0" cellpadding="1">
 <tr class="headerNavigation">
<td class="headerNavigation">  <?php echo $breadcrumb->trail(' » '); ?></td>
<?php
// added for loginbox
 if ( (basename($PHP_SELF) != FILENAME_LOGIN) && (basename($PHP_SELF) !=  FILENAME_CREATE_ACCOUNT) && !tep_session_is_registered('customer_id')) {
 if (!tep_session_is_registered('customer_id')) {

?>
<!-- loginbox //-->
<td align="right"><?php echo tep_draw_form('login', tep_href_link(FILENAME_LOGIN, 'action=process', 'SSL')); ?>  
</td>

<td class="smalltext">
<?php echo BOX_LOGINBOXH_EMAIL; ?>
<?php echo tep_draw_input_field('email_address'); ?>

<?php echo BOX_LOGINBOXH_PASSWORD; ?>
		<?php echo tep_draw_password_field('password'); ?>
		  <?php echo tep_image_submit('button_go.gif', IMAGE_BUTTON_LOGIN); ?></tr></td>
<tr class="header"><td colspan="3" align="right" class="smallText" width="100%"><?php echo '<a href="' . tep_href_link(FILENAME_PASSWORD_FORGOTTEN, '', 'SSL') . '">' . BOX_LOGINBOXH_FORGOT_PASSWORD . '</a>'; ?>
<?php echo BOX_LOGINBOXH_TEXT_NEW . ' ' . '<a href="' . tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL') . '">' . BOX_LOGINBOXH_NEW . '</a>'; ?>
 </tr>
</tr></table></td>
 </table></form></td>

Link to comment
Share on other sites

alright, HALF WAY THERE.. now i just need to align that td to the right and i SHOULD be all set.

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

alright, HALF WAY THERE.. now i just need to align that td to the right and i SHOULD be all set.

 

Yep ... hmmm try this then:

 

<table border="0" width="100%" cellspacing="0" cellpadding="1">
 <tr class="headerNavigation">
<td class="headerNavigation">  <?php echo $breadcrumb->trail(' » '); ?></td>
<?php
// added for loginbox
 if ( (basename($PHP_SELF) != FILENAME_LOGIN) && (basename($PHP_SELF) !=  FILENAME_CREATE_ACCOUNT) && !tep_session_is_registered('customer_id')) {
 if (!tep_session_is_registered('customer_id')) {

?>
<!-- loginbox //-->

<td class="smalltext" align="right">
<?php echo tep_draw_form('login', tep_href_link(FILENAME_LOGIN, 'action=process', 'SSL')); ?>  
<?php echo BOX_LOGINBOXH_EMAIL; ?>
<?php echo tep_draw_input_field('email_address'); ?>

<?php echo BOX_LOGINBOXH_PASSWORD; ?>
		<?php echo tep_draw_password_field('password'); ?>
		  <?php echo tep_image_submit('button_go.gif', IMAGE_BUTTON_LOGIN); ?></tr></td>
<tr class="header"><td colspan="2" align="right" class="smallText" width="100%"><?php echo '<a href="' . tep_href_link(FILENAME_PASSWORD_FORGOTTEN, '', 'SSL') . '">' . BOX_LOGINBOXH_FORGOT_PASSWORD . '</a>'; ?>
<?php echo BOX_LOGINBOXH_TEXT_NEW . ' ' . '<a href="' . tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL') . '">' . BOX_LOGINBOXH_NEW . '</a>'; ?>
 </tr>
</tr></table></td>
 </table></form></td>

Link to comment
Share on other sites

This worked in Firefox:

 

<!-- loginbox //-->
<td align="right">
<form name="login" action="https://secure.hostmonster.com/~furryfam/catalog/login.php?action=process&osCsid=1108907f931756e1202251b1d508b6a0" method="post">  
</form></td>

<td valign="top"class="smalltext">
e-mail<input name="email_address" type="text">
</td>
<td align="center" class="smalltext">
password			
<input name="password" maxlength="40" type="password">
<input src="includes/languages/english/images/buttons/button_go.gif" alt="Sign In" title=" Sign In " border="0" type="image"></td>
</tr>

I'll let you reverse engineer the HTML source back to your PHP code.

:lol:

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

i got it all working.. thanks to the two of you.

 

just a quick question though.. any thoughts on why my GO button is hovering a little higher than it should?? it is entirely transparent, and ther eis not alignment really set on it inside the table.. i'm not sure what to do about it.

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

i got it all working.. thanks to the two of you.

 

just a quick question though.. any thoughts on why my GO button is hovering a little higher than it should?? it is entirely transparent, and ther eis not alignment really set on it inside the table.. i'm not sure what to do about it.

 

You can either put a style="padding-top: (amount from top)px" in the <input field like so

<?php echo tep_image_submit('button_go.gif', IMAGE_BUTTON_LOGIN,'style="padding-top:5px;"');

 

OR you can add that image submit button in another <td> and set its valign to middle or bottom like so:

<td class="smalltext">
<?php echo BOX_LOGINBOXH_EMAIL; ?>
<?php echo tep_draw_input_field('email_address'); ?>

<?php echo BOX_LOGINBOXH_PASSWORD; ?>
		<?php echo tep_draw_password_field('password'); ?></td>
		  <td valign="bottom"><?php echo tep_image_submit('button_go.gif', IMAGE_BUTTON_LOGIN); ?></td></tr>

 

Don't forget if your adding another <td> here you need to make sure your next row where the Forgot Password field is needs to have exact amount of cells (so you need to increase your "colspan" by one) :)

Link to comment
Share on other sites

ohh so close ... yep definately go with the extra <td> for the input image ... but add a align="right" to that one also: <td valign="bottom" align="right"> and that should do it ;)

Link to comment
Share on other sites

the second option worked much better, thank you.. the first just added the 5 pix to teh top, but it still didnt align it properly, now it is aligned - now i need to align the forgot password and create account to look ok with the above forms.

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

the second option worked much better, thank you.. the first just added the 5 pix to teh top, but it still didnt align it properly, now it is aligned - now i need to align the forgot password and create account to look ok with the above forms.

 

Set the width of the last <td> that holds the image submit button to be the same width as the image iteself ... that way it should all align to the right (if you want it all aligned to the right that is) ... just saw u centered the last <td> with the image ... looks better like that I reckon ... your call though

 

A quick way around aligning the bottom row with the top is to set a padding-right property to the bottom cell ... hehe i love my paddings :D :D

 

<tr class="header"><td colspan="4" style="padding-right: 10px;" align="right" class="smallText" width="100%"><?php echo '<a href="' . tep_href_link(FILENAME_PASSWORD_FORGOTTEN, '', 'SSL') . '">' . BOX_LOGINBOXH_FORGOT_PASSWORD . '</a>'; ?>
<?php echo BOX_LOGINBOXH_TEXT_NEW . ' ' . '<a href="' . tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL') . '">' . BOX_LOGINBOXH_NEW . '</a>'; ?></td></tr>

Link to comment
Share on other sites

i got it looking pretty good.. I centered the and valign bottom the image,a nd everything up there looks pretty darn good, in my opinion..

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...