Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Image alignment


khaaliq

Recommended Posts

Posted

Can someone please tell me how to fix this;

 

http://www.greatsoap.com/images/screen.gif

 

This is the code that I have in header.php;

 

<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="ffffff" background="images/banner.gif">

<tr class="header">

<td width="100%" valign="right"><?php echo tep_image(DIR_WS_IMAGES . 'banner.gif', 'The Root to Life'); ?></td>

</td>

</tr>

</table>

Posted

I tested your code, and it does work...

 

you must not have your table background pointing to your images folder...

 

i guess if you don't know where your images folder is, you can use this code...

 

<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="ffffff" background="<?php echo DIR_WS_IMAGES . ' banner.gif' ?>"> 

<tr class="header"> 

<td width="100%" valign="top" align="left"><?php echo tep_image(DIR_WS_IMAGES . 'banner.gif', 'The Root to Life'); ?></td> 

</tr> 

</table>

 

I changed the valign to "top" because there is no such thing as a right vertical alignment... you can valign top, middle, bottom, absmiddle, absbottom.

 

I tried best I could to take the banner.gif from the screenshot, and set as the background, it is pretty seamless with the image (it can repeat itself)... I tested up to 1024x768 and the words didn't repeat so you are good there...

 

I also did it so that it stretched the image... this looked terrible above 800x600... the background looked the best... you can see my test here: http://www.allthingsnewage.com/test4khaaliq

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

- Edmund Burke

Posted

forgot a semi colon in the code... here its fixed...

 

<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="ffffff" background="<?php echo DIR_WS_IMAGES . ' banner.gif'; ?>"> 

<tr class="header"> 

<td width="100%" valign="top" align="left"><?php echo tep_image(DIR_WS_IMAGES . 'banner.gif', 'The Root to Life'); ?></td> 

</tr> 

</table>

 

* Damn you power hungry mods for not letting us edit our own posts *

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

- Edmund Burke

Posted

Thanks a million but I could not get the below code to work so I viewed the source of the example that you send and I used the code from the "stretched" example. Now I have to figure out how to put a rotating image on the default.php page. :lol:

 

 

 

forgot a semi colon in the code... here its fixed...

 

<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="ffffff" background="<?php echo DIR_WS_IMAGES . ' banner.gif'; ?>"> 

<tr class="header"> 

<td width="100%" valign="top" align="left"><?php echo tep_image(DIR_WS_IMAGES . 'banner.gif', 'The Root to Life'); ?></td> 

</tr> 

</table>

 

* Damn you power hungry mods for not letting us edit our own posts *

Posted
Thanks a million but I could not get the below code to work so I viewed the source of the example that you send and I used the code from the "stretched" example. Now I have to figure out how to put a rotating image on the default.php page. :lol:

 

 

 

forgot a semi colon in the code... here its fixed...

 

<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="ffffff" background="<?php echo DIR_WS_IMAGES . ' banner.gif'; ?>"> 

<tr class="header"> 

<td width="100%" valign="top" align="left"><?php echo tep_image(DIR_WS_IMAGES . 'banner.gif', 'The Root to Life'); ?></td> 

</tr> 

</table>

 

* Damn you power hungry mods for not letting us edit our own posts *

 

whoops again... there is a space in front of "banner.gif"...

 

2nd fixed code:

<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="ffffff" background="<?php echo DIR_WS_IMAGES . 'banner.gif'; ?>"> 

<tr class="header"> 

<td width="100%" valign="top" align="left"><?php echo tep_image(DIR_WS_IMAGES . 'banner.gif', 'The Root to Life'); ?></td> 

</tr> 

</table>

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

- Edmund Burke

Archived

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

×
×
  • Create New...