Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Links look different in Firefox vs. IE


longhorn1999

Recommended Posts

Hi everyone,

 

I made a image link box for use in my right column, which leads to a product page:

 

includes/boxes/product28_image_box.php

<tr> 
<td> 
<?php 
echo '<p><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'cPath=1&products_id=28') . '">
<img src="images/manufacturer1/product28.jpg" alt="Product 28" title="Product 28" class="center" border="0"></a></p>'; 
?>
</td>
</tr>
<td class="rightColumnPrice" <a href="<?php echo tep_href_link(FILENAME_PRODUCT_INFO, 'cPath=1&products_id=28'); ?>">Product 28 - $199.99</a></td>

 

 

And I added this piece to the stylesheet specifically for use with this image link box:

 

TD.rightColumnPrice {
 font-family: Verdana, Arial, sans-serif;
 font-size: 12px;
 font-weight: bold;
 background: #ffffff;
 color: #072B8A;
 text-align: center;
}

 

But my problem is that I can't get them to look alike in Firefox and IE. In Firefox, the link for the $199.99 price works but the color of that line stays black. And in IE, the color of the line is blue as I want it to be, but the hyperlink doesn't work. I was reading elsewhere that using/not using absolute paths might cause this problem but I'm not sure how that relates to the code I have here.

 

http://www.computerhope.com/jargon/a/absopath.htm

 

Any ideas as to what I'm missing??

Link to comment
Share on other sites

This code:

 

<td class="rightColumnPrice" <a href="<?php echo tep_href_link(FILENAME_PRODUCT_INFO, 'cPath=1&products_id=28'); ?>">Product 28 - $199.99</a></td>

Needs to be:

 

<td class="rightColumnPrice"> <a href="<?php echo tep_href_link(FILENAME_PRODUCT_INFO, 'cPath=1&products_id=28'); ?>">Product 28 - $199.99</a></td>

(Hope you see the diff)

 

And if you want to apply a class to the link it needs to be:

 

<td class="rightColumnPrice"> <a class="SOME_CLASS_HERE" href="<?php echo tep_href_link(FILENAME_PRODUCT_INFO, 'cPath=1&products_id=28'); ?>">Product 28 - $199.99</a></td>

If you don't, the simple anchor class in the stylesheet overrides the one in the <td...> tag.

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

This code:

 

<td class="rightColumnPrice" <a href="<?php echo tep_href_link(FILENAME_PRODUCT_INFO, 'cPath=1&products_id=28'); ?>">Product 28 - $199.99</a></td>

Needs to be:

 

<td class="rightColumnPrice"> <a href="<?php echo tep_href_link(FILENAME_PRODUCT_INFO, 'cPath=1&products_id=28'); ?>">Product 28 - $199.99</a></td>

(Hope you see the diff)

 

And if you want to apply a class to the link it needs to be:

 

<td class="rightColumnPrice"> <a class="SOME_CLASS_HERE" href="<?php echo tep_href_link(FILENAME_PRODUCT_INFO, 'cPath=1&products_id=28'); ?>">Product 28 - $199.99</a></td>

If you don't, the simple anchor class in the stylesheet overrides the one in the <td...> tag.

 

 

osC 101 courtesy of Germ...thanks again Jim!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...