Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

newsletter email box misaligned in IE


longhorn1999

Recommended Posts

Hi everyone,

 

Well I just noticed an annoying error that I'd missed for a month apparently. I have a box in my left column for people to enter their email to register for a newsletter.

 

After much trial and error, this gave me the look I was going for:

<!-- visitor_e-mail //-->
         <tr>
           <td>
<?php
 $info_box_contents = array();
 $info_box_contents[] = array('text' => BOX_HEADING_VISITOR_EMAIL);

 new infoBoxHeading($info_box_contents, false, false);

 $info_box_contents = array();
 $info_box_contents[] = array('form' => tep_draw_form('email', tep_href_link(FILENAME_VISITOR_EMAIL, 'action=process')),
                              'align' => 'center',
                              'text' => tep_draw_input_field('to_email_address', '', 'size="11"') . tep_image_submit('button_visitor_email.gif', BOX_HEADING_VISITOR_EMAIL, 'align="right"')) ;

 new infoBox($info_box_contents);
?>
           </td>
         </tr>
<!-- visitor_email_eof //-->

 

This is what it looks like in firefox, as it's supposed to:

newsletterboxfirefoxali.jpg

 

And this is what it looks like on the product pages in IE, even though it works fine on the home page, in manufacturer and category pages, and even on SSL account/login/checkout pages:

newsletterboxiemisalign.jpg

 

Is there something in includes/modules/product_listing.php or product_info.php I should edit? Even I shorten the size of the email field from 11 to 4 for instance, it remains misaligned.

 

Any help would be much appreciated!

Link to comment
Share on other sites

Try this:

 

 

<!-- visitor_e-mail //-->
         <tr>
           <td>
<?php
 $info_box_contents = array();
 $info_box_contents[] = array('text' => BOX_HEADING_VISITOR_EMAIL);

 new infoBoxHeading($info_box_contents, false, false);

 $info_box_contents = array();
 $info_box_contents[] = array('form' => tep_draw_form('email', tep_href_link(FILENAME_VISITOR_EMAIL, 'action=process')),
                              'align' => 'center',
                              'text' => tep_draw_input_field('to_email_address', '', 'size="11"', 'align="left"') . tep_image_submit('button_visitor_email.gif', BOX_HEADING_VISITOR_EMAIL, 'align="right"')) ;

 new infoBox($info_box_contents);
?>
           </td>
         </tr>
<!-- visitor_email_eof //-->

Link to comment
Share on other sites

Try this:

 

 

<!-- visitor_e-mail //-->
         <tr>
           <td>
<?php
 $info_box_contents = array();
 $info_box_contents[] = array('text' => BOX_HEADING_VISITOR_EMAIL);

 new infoBoxHeading($info_box_contents, false, false);

 $info_box_contents = array();
 $info_box_contents[] = array('form' => tep_draw_form('email', tep_href_link(FILENAME_VISITOR_EMAIL, 'action=process')),
                              'align' => 'center',
                              'text' => tep_draw_input_field('to_email_address', '', 'size="11"', 'align="left"') . tep_image_submit('button_visitor_email.gif', BOX_HEADING_VISITOR_EMAIL, 'align="right"')) ;

 new infoBox($info_box_contents);
?>
           </td>
         </tr>
<!-- visitor_email_eof //-->

 

 

Thanks, that looked like it would be a good fix, but unfortunately the same problem remains. I then just tried what you posted along with taking out the 'align' => 'center' and this is what comes up in IE:

newsletterboxiemisalign.jpg

 

It's getting closer, but I still have to get them vertically aligned somehow. It still works properly in the other pages and with Firefox.

Link to comment
Share on other sites

Well upon further inspection I seem to have some strange error that causes all of these forms to be misaligned in product pages, but only with IE.

 

I changed align="right" to align="top" to get the closest fit in IE product pages, even though the space disappeared. I know I can stick a   in there for a spacer, but this shows my problem more clearly:

newsletterboxiemisalign.jpg

 

 

I have a search box in my header which again becomes strangely misaligned (the search image is raised slightly), but only in product pages in Internet Explorer:

searchboxiemisalignedin.jpg

 

 

Besides product pages, the search and newsletter (visitoremail.php) functions exactly as I want it. Any ideas what could be going wrong with my forms? I'm even using IE8. I'm scared to even look at what's going on in IE6...

Link to comment
Share on other sites

Try to make the search input box a bit smaller:

 

find this:

'text' => tep_draw_input_field('to_email_address', '', 'size="11"', 'align="left"')

 

 

and replace this:

 

'text' => tep_draw_input_field('to_email_address', '', 'size="9"', 'align="left"')

 

 

or try to experiment with the box size and yes put the TOP value back to LEFT

Link to comment
Share on other sites

Try to make the search input box a bit smaller:

 

find this:

'text' => tep_draw_input_field('to_email_address', '', 'size="11"', 'align="left"')

 

 

and replace this:

 

'text' => tep_draw_input_field('to_email_address', '', 'size="9"', 'align="left"')

 

 

or try to experiment with the box size and yes put the TOP value back to LEFT

 

Thanks Boriss,

 

I did try this but I keep getting the same error, only worse. For some reason, only align="top" makes it some the form and the image line up even remotely in sync. I need to dig deeper into some other files I think. I know all browsers are different, but I'm not sure what exactly is causing this to render differently in IE when firefox works fine...

Link to comment
Share on other sites

Thanks Boriss,

 

I did try this but I keep getting the same error, only worse. For some reason, only align="top" makes it some the form and the image line up even remotely in sync. I need to dig deeper into some other files I think. I know all browsers are different, but I'm not sure what exactly is causing this to render differently in IE when firefox works fine...

 

 

OK then u need to dig in to it!

 

search for - includes/boxes/search.php

 

 

and look for the tep_draw_input_field

 

when u have found it u will see the CSS class for the search input, find the stylesheet.css and make the necessary changes or try experiment at least! ;)

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...