Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Border around an image


a.niedermann

Recommended Posts

Hey there!

 

How can I add the "border" command to the following link?:

 

<?php echo '<a href="' . tep_href_link('numispost.php') . '">' . tep_image(DIR_WS_IMAGES . 'newbuttons/numispost.gif', 'graphic text') . '</a>'; ?>

 

Thanks for your help!

 

Andreas

Link to comment
Share on other sites

the tep_image function takes an optional third parameter where you can add in a style. In this case you would type this:

 

tep_image(DIR_WS_IMAGES . 'newbuttons/numispost.gif', 'graphic text', 'style="border:1px solid #FF0000;"')

 

This will add a 1px solid red border around the image. Change it to whatever you require.

Link to comment
Share on other sites

the tep_image function takes an optional third parameter where you can add in a style. In this case you would type this:

 

tep_image(DIR_WS_IMAGES . 'newbuttons/numispost.gif', 'graphic text', 'style="border:1px solid #FF0000;"')

 

This will add a 1px solid red border around the image. Change it to whatever you require.

 

 

Perfect! Thank you very much!

Link to comment
Share on other sites

the tep_image function takes an optional third parameter where you can add in a style. In this case you would type this:

 

tep_image(DIR_WS_IMAGES . 'newbuttons/numispost.gif', 'graphic text', 'style="border:1px solid #FF0000;"')

 

This will add a 1px solid red border around the image. Change it to whatever you require.

 

 

Hey Jason!

 

Unfortunately it did not work as you suggested...

 

<?php  echo '<a href="' . tep_href_link('numispost.php') . '">' . tep_image(DIR_WS_IMAGES . 'newbuttons/numispost.gif', 'Numis-Post & HMZ', 'style="border: 1px solid #000000;"') . '</a>'; ?>

 

Any help is apprecitated!!

 

Andreas

Link to comment
Share on other sites

Ok sorry - that was off the top of my head. You can see the tep_image function in /includes/functions/html_output.php. The parameters argument is actually the fifth one (not third as I said initially)

 

function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '')

 

So change your code to this:

 

tep_image(DIR_WS_IMAGES . 'newbuttons/numispost.gif', 'Numis-Post & HMZ', '', '', 'style="border: 1px solid #000000;"')

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...