Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Navbar images inbetween links..need HELP!


Guest

Recommended Posts

Hi,

 

I've put images into the nav bar in between the links as below.

 

<table border="0" width="100%" height="21" cellspacing="0" cellpadding="0">

<tr class="headerNavigation">

   <td class="headerNavigation">  <?php echo $breadcrumb->trail(' » '); ?></td>

   <td class="headerNavigation" align="right" valign="top" cellspacing="0"><img src="images/menu_break.gif" width="23" height="21"> 

   <?php if (tep_session_is_registered('customer_id')) { ?>

   <a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"> 

   <?php echo HEADER_TITLE_LOGOFF; ?>

   </a><img src="images/menu_break.gif" width="23" height="21"> 

   <?php } ?><a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"> 

   <?php echo HEADER_TITLE_MY_ACCOUNT; ?>

   </a><img src="images/menu_break.gif" width="23" height="21"> 

   <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>" class="headerNavigation"> 

   <?php echo HEADER_TITLE_CART_CONTENTS; ?>

   </a><img src="images/menu_break.gif" width="23" height="21"> 

   <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'); ?>" class="headerNavigation"> 

   <?php echo HEADER_TITLE_CHECKOUT; ?>

   </a>   </td>

 </tr>

 

problem is the text is on the bottom of the line and obviously I want it in the middle... tried all the usual valign="middle" etc but it wont work...

 

Can you put me in the right direction.

 

Thanks :)

Link to comment
Share on other sites

change that code to this:

<table border="0" width="100%" height="21" cellspacing="0" cellpadding="0"> 

<tr class="headerNavigation"> 

   <td class="headerNavigation" valign="middle">  <?php echo $breadcrumb->trail(' ? '); ?></td> 

   <td class="headerNavigation" align="right" valign="middle" cellspacing="0"><img src="images/menu_break.gif" width="23" height="21" align="absmiddle"> 

   <?php if (tep_session_is_registered('customer_id')) { ?> 

   <a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"> 

   <?php echo HEADER_TITLE_LOGOFF; ?> 

   </a><img src="images/menu_break.gif" width="23" height="21" align="absmiddle"> 

   <?php } ?><a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"> 

   <?php echo HEADER_TITLE_MY_ACCOUNT; ?> 

   </a><img src="images/menu_break.gif" width="23" height="21" align="absmiddle"> 

   <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>" class="headerNavigation"> 

   <?php echo HEADER_TITLE_CART_CONTENTS; ?> 

   </a><img src="images/menu_break.gif" width="23" height="21" align="absmiddle"> 

   <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'); ?>" class="headerNavigation"> 

   <?php echo HEADER_TITLE_CHECKOUT; ?> 

   </a>   </td> 

 </tr>

 

basically the only changes were to add align="absmiddle" to the image tags... the default alignment of images is to align with text bottom... I also added valign="middle" to the TD tags just to be sure that the text will align in the middle, then the images in the middle of that since they are now set to align in the absmiddle (absolute middle).

 

I tested on my test site and it works good... have fun!

The only thing necessary for evil to flourish is for good men to do nothing

- Edmund Burke

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...