Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Backgroung Images For Links


Guest

Recommended Posts

Hi everyone,

 

In a bid to optimize my site for google I am currently changing my sites main menu from having clickable image links to text links. To keep the main menu looking as much the same as possible I want to place the same images as background images for each new text link. So my current code for each image link looks like this:

 

'<a href="' . tep_href_link(FILENAME_CONTACT_US) . '" onMouseOver="MM_swapImage(\'menu7a\', \'\', \'../images/menu7b.gif\', 1)" 
onMouseOut="MM_swapImgRestore()">' . tep_image(DIR_WS_IMAGES . 'menu7a.gif', 'Contact Us', null, null, 'name="menu7a"') . '</a>');

 

Changing the same link to a plain text link will look like this:

 

'<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a><br>' .

 

So does anyone know how or what additional code I need to give the plain text link a background image? Any help much appreciated.

 

Cheers.

Link to comment
Share on other sites

put the links in a table and have the table cell with the background on.

'<table border="0" cellpadding="0" cellspacing="0" width="PUT WIDTH HERE"><tr><td style="background-image:url(' . DIR_WS_IMAGES . 'menu7a.gif);"><a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a></td></tr></table>' .

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...