Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Banner on top of page


sharpstuff

Recommended Posts

I would like to center the banner I put in place of the standard osC banner. I would like it in the center of the page. I have scoured through all of the posts and have not found where to do this. Any help would be appreciated.

Link to comment
Share on other sites

OK this is what you wanna do. Go to includes>header.php then look for this line

 

<td valign="left"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'osCommerce.gif', 'osCommerce') . '</a>'; ?></td>

 

and replace it with

 <center><img src="images/YOU IMAGE"></center>

 

 

Then just make sure you image is uploaded to you image dir.

Link to comment
Share on other sites

OK this is what you wanna do. Go to includes>header.php then look for this line

 

<td valign="left"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'osCommerce.gif', 'osCommerce') . '</a>'; ?></td>

 

and replace it with

 <center><img src="images/YOU IMAGE"></center>

Then just make sure you image is uploaded to you image dir.

 

thanks...I will tryit when the morning comes...its getting late..or early.

Link to comment
Share on other sites

OK this is what you wanna do. Go to includes>header.php then look for this line

 

<td valign="left"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'osCommerce.gif', 'osCommerce') . '</a>'; ?></td>

 

and replace it with

 <center><img src="images/YOU IMAGE"></center>

Then just make sure you image is uploaded to you image dir.

 

 

That will only center it in the cell the image is in. There are images/links to the right of that that will stop the header image from actually being centered at the top of the page so you either have to remove them, add a new row above the one the image is in and move the image or just put the image at the top of the page outside of the table itself.

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

I know, considering this is the code there..

 

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

<tr class="header">

<td valign="middle"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'oscommerce.gif', 'osCommerce') . '</a>'; ?></td>

<td align="right" valign="bottom"><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_account.gif', HEADER_TITLE_MY_ACCOUNT) . '</a>  <a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' . tep_image(DIR_WS_IMAGES . 'header_cart.gif', HEADER_TITLE_CART_CONTENTS) . '</a>  <a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_checkout.gif', HEADER_TITLE_CHECKOUT) . '</a>'; ?>  </td>

</tr>

</table>

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

Note this line above what i said to replace

 

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

 

And i said to replace this

 

<td valign="middle"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'oscommerce.gif', 'osCommerce') . '</a>'; ?></td>

 

 

And not this:

 

<td align="right" valign="bottom"><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_account.gif', HEADER_TITLE_MY_ACCOUNT) . '</a>  <a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' . tep_image(DIR_WS_IMAGES . 'header_cart.gif', HEADER_TITLE_CART_CONTENTS) . '</a>  <a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_checkout.gif', HEADER_TITLE_CHECKOUT) . '</a>'; ?>  </td>
</tr>
</table>

 

You were saying?

Link to comment
Share on other sites

Wendy =1

Butterfly=0

 

Wendy is correct. Changing the first td from align left to align center does not alter the fact that on the same line (different td, same line) there is also a td align right for the stock osCommerce images.

 

The way to do it is to remove the td align right completely (nobody wants to keep those images anyway), and then to align center the one remaining td containing the logo.

 

Vger

Link to comment
Share on other sites

Wendy =1

Butterfly=0

 

Wendy is correct.  Changing the first td from align left to align center does not alter the fact that on the same line (different td, same line) there is also a td align right for the stock osCommerce images.

 

The way to do it is to remove the td align right completely (nobody wants to keep those images anyway), and then to align center the one remaining td containing the logo.

 

Vger

 

 

You might wanna change that to me 1, re-read what you just wrote and see what i have been saying.

 

In case you didnt see it i will post it again.

 

REPLACE THIS LINE:

 

<td valign="left"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'osCommerce.gif', 'osCommerce') . '</a>'; ?></td>

 

WITH THIS LINE:

 <center><img src="images/YOU IMAGE"></center>

 

So yes that is REPLACING the whole <td> like you said isnt. I never said to replace anything below that like:

 

<td align="right" valign="bottom"><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_account.gif', HEADER_TITLE_MY_ACCOUNT) . '</a>  <a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' . tep_image(DIR_WS_IMAGES . 'header_cart.gif', HEADER_TITLE_CART_CONTENTS) . '</a>  <a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_checkout.gif', HEADER_TITLE_CHECKOUT) . '</a>'; ?>  </td>
</tr>
</table>

 

 

Go try it and tell me it doesnt work?

Link to comment
Share on other sites

Then you would have a broken table and stuff not lining up correctly because there is still another table cell there...

 

you cant just overwrite a table cell and not the ones that are in the same table with it.

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

Designing sites for 12 years and can't see you are incorrect?

 

You are replacing a table cell with an image... fine, have at it. Incorrect but ok. It will make the image invisible but okie dokie.

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

You were saying. I dont see ANYTHING wrong with it do you?

 

http://www.texascampingforum.com/osc/catalog/index.php

 

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr class="header">
   <center><img src="images/oscommerce.gif"></center>

   <td align="right" valign="bottom"><a href="http://www.texascampingforum.com/osc/catalog/account.php"><img src="images/header_account.gif" border="0" alt="My Account" title=" My Account " width="30" height="30"></a>  <a href="http://www.texascampingforum.com/osc/catalog/shopping_cart.php"><img src="images/header_cart.gif" border="0" alt="Cart Contents" title=" Cart Contents " width="30" height="30"></a>  <a href="http://www.texascampingforum.com/osc/catalog/checkout_shipping.php"><img src="images/header_checkout.gif" border="0" alt="Checkout" title=" Checkout " width="30" height="30"></a>  </td>
 </tr>
</table>
<table border="0" width="100%" cellspacing="0" cellpadding="1">
 <tr class="headerNavigation">
   <td class="headerNavigation">  <a href="http://www.texascampingforum.com" class="headerNavigation">Top</a> » <a href="http://www.texascampingforum.com/osc/catalog/index.php" class="headerNavigation">Catalog</a></td>
   <td align="right" class="headerNavigation"><a href="http://www.texascampingforum.com/osc/catalog/account.php" class="headerNavigation">My Account</a>  |  <a href="http://www.texascampingforum.com/osc/catalog/shopping_cart.php" class="headerNavigation">Cart Contents</a>  |  <a href="http://www.texascampingforum.com/osc/catalog/checkout_shipping.php" class="headerNavigation">Checkout</a>   </td>

 </tr>
</table>

Link to comment
Share on other sites

well for starters its not centered =) Not to mention the code is still incorrect whether the pic shows up or not.

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

Line 13, column 11: document type does not allow element "CENTER" here; missing one of "TH", "TD" start-tag

 

<center><img src="images/oscommerce.gif"></center>

 

The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

 

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").

 

for those interested in making their sites W3 compliant.

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...