Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

adding images


mkdesigns

Recommended Posts

I am adding images to the footer... three boxes that are side by side going across. I was able to add them, but they are all one on top of the other. How do I add these so they are side by side? Also wanting to add a link separately to each of them. Thank you!

Link to comment
Share on other sites

I am adding images to the footer... three boxes that are side by side going across. I was able to add them, but they are all one on top of the other. How do I add these so they are side by side? Also wanting to add a link separately to each of them. Thank you!

 

Hello,

 

The way I accomplished the same was...

#1. in the <td> add valign="top" and

#2. place the <img tag> inside a <span style="position:relative;left:xx;top:xx"><img tag></span> This allows you to move/adjust image position to be exactly where you want it by changing the distance from top & left.

 

Hope this helps.

Frank

Link to comment
Share on other sites

<table align="left" border="0" width="300" hieght="88"><tr><td>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr class="footer">
   <td valign="left"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'newsletter_box.jpg', '') . '</a>'; ?></td></tr>
<table align="center" border="0" width="300" hieght="88"><tr><td>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr class="footer">
   <td valign="middle"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'rewards_box.jpg', '') . '</a>'; ?></td></tr>
<table align="right" border="0" width="300" hieght="88"><tr><td>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr class="footer">
   <td valign="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'blog_box.jpg', '') . '</a>'; ?></td>
</tr>

 

That is what I have right now, but it is obviously wrong.

Link to comment
Share on other sites

holy moly, can you give me an example? Sorry!

Sure.... (this is using the default footer that comes in osc2.2 RC2a)

Find

<?php

if ($banner = tep_banner_exists('dynamic', '468x50')) {

?>

 

What you want is right above this. You should see...

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

<tr>

<td align="center" class="smallText"><?php echo FOOTER_TEXT_BODY; ?></td>

</tr>

</table>

 

What I did was add 2 more table rows, so you get something like this

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

<tr>

<td valign="top">

<span style="position:relative;left:5;top:5"><img src="anyimage1.jpg"></span>

<span style="position:relative;left:55;top:5"><img src="anyimage2.jpg"></span>

</td>

</tr>

<tr>

<td align="center" class="smallText"><?php echo FOOTER_TEXT_BODY; ?></td>

</tr>

<tr>

<td valign="top">

<span style="position:relative;right:5;top:5"><img src="anyimage3.jpg"></span>

<span style="position:relative;right:55;top:5"><img src="anyimage4.jpg"></span>

</td>

</tr>

</table>

 

This keeps your default oscommerce text centered on the page and allows you to add images on either side, beside each other. The css style left tells it how far to postition the image from the left, and conversely on the right hand side of the screen you will use the css right postion to tell it how far from the right margin to postion the image.

 

ALSO, you can add your href links inside the <span></span>.

Hope this helps,

Frank

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...