Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Silly Question - Formatting an image


Taking the Lead

Recommended Posts

Posted

Hi

I know this is a simple question but I just can not find the answer.

 

I have changed the table_background_default.gif image on the front page of shop - but I can not seem to make the Title text to the left of the image format to the top of the image. It seems to want to format in the middle of the image.

 

My site is www.TTLShop.co.uk

 

Can someone please help as to the code I use.

 

Ideally I would like both the Taking the Lead title and the Welcome Guest etc. to move up and the image to word wrap to the left, so the whole thing looks neater.

 

Thanks

John

Posted

Thanks Jack

This is the script from index.php and it already includes <valign="top"> but it still doesn't seem to do what I want - what am i doing wrong.

John

 

 

 

 

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

<tr>

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

<tr>

<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

<td class="pageHeading" align="right" valign="top"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_default.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

</tr>

</table></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

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

<tr>

<td class="main"><?php echo tep_customer_greeting(); ?></td>

</tr>

Posted

The valign is for the image. Try removing it or adding it to the cell for the HEADING_TITLE or both. If that fails, you will need to place the image cell in a table and use another cell to position it.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Posted

THanks - that does the job ideal.

 

I've now been trying to bring the welcome guest message into the same box so it just lies a couple of spaces below the title.

 

All I achieved was the welcome guest message AND explantion of shop message in the same box and in same font as title.

 

Could someone please help me with the script I need to add

 

** <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

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

<tr>

<td class="pageHeading" valign="top"><?php echo HEADING_TITLE; ?></td>

<td class="pageHeading" align="right" ><?php echo tep_image(DIR_WS_IMAGES . 'table_background_default.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

</tr>

</table></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

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

<tr>

<td class="main" valign="top"><?php echo tep_customer_greeting(); ?></td>

</tr>

 

**

 

Thanks John

Posted

Jack

The url is www.ttlshop.co.uk

 

I'm trying to bring the "Welcome to you... " part up and under the Heading more. The heading is in one cell and the "Welcome" part is in the cell underneath. I need to introduce it into the "Welcome" cell.

 

Does that make sense??

John

Posted

Yes, it does. The problem is that the top text and the image are in table so the next row of text can't begin until the table ends. Since the table is as large as the image, the text starts where the image ends. You need something like

<tr>

<td>
<tr><table>
<tr>
<td class="pageHeading" valign="top"><?php echo HEADING_TITLE; ?></td> 
</tr>
<tr>
<td class="main" valign="top"><?php echo tep_customer_greeting(); ?></td>
</tr>
</table></td>
</td>
<td class="pageHeading" align="right" ><?php echo tep_image(DIR_WS_IMAGES . 'table_background_default.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
</tr>

This is untested but should get you going in the right direction.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Archived

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

×
×
  • Create New...