Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Top Banner


ozEworks

Recommended Posts

I know we talked about this many times when I first started with osCommerce but I never solved the whole oscommerce.gif file thing. I just worked around it but it has come back to haunt me.

 

I don't want a center store. I want one that expands to the monitor width.

 

So who do I get the gif file to do that? I have a background color and I have a file about 1024 pixels wide (from memory) but on my new 19" monitor even the backgrouddcolor does not go all the way across.

Link to comment
Share on other sites

set image width to 100% rather than defined pixel width, this will stretch it to full table width, which should be full screen width - if not, look at your tables and make them 100%

Please note - if I have suggested a contrib above, it doesnt mean it will work! Most of the contribs are not ones I've used, but may be useful for your particular problem....

Have you tried a refined search? Chances are your problem has already been dealt with elsewhere on the forums.....

if (stumped == true) {

return(square_one($start_over)

} else {

$random_query = tep_fetch_answer($forum_query)

}

Link to comment
Share on other sites

I know we talked about this many times when I first started with osCommerce but I never solved the whole oscommerce.gif file thing.  I just worked around it but it has come back to haunt me.

 

I don't want a center store. I want one that expands to the monitor width. 

 

So who do I get the gif file to do that?  I have a background color and I have a file about 1024 pixels wide (from memory) but on my new 19" monitor even the backgrouddcolor does not go all the way across.

Just in case you are not aware of it, the vast majority of visitors use 800x600 screen resolutions. With a banner that size, you will cause all of those visitors to have to scroll to see your site. When I run across a poorly coded site like that, I leave.

 

Jack

Support Links:

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

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

niknakgroup, I see you have a centered shop. I have tried the "100%" thing and it has no impact.

 

By the way, why do you have all those product links at the bottom of your page? Is that for Search Engines?

Link to comment
Share on other sites

Also, if you set the banner as a backround for the table row, it will adjust for all monitor sizes...as long as the table is set for 100%. I have done this with my site shop, which is still a work in progress, but we can get the idea.

 

http://www.j4media.com/shop

 

The middle image (the large rectangle with the images in it) has a width of 1200 and is set as the background of the first row, left hand column of the header table. The 'J4media' logo is standard image placed in that row (replacing the default oscommerce.gif).

 

The 'PayPal' image is a standard image in the first row, right hand column of the header row.

 

The overall table is set to 100%, the left hand column row had no fixed width set and the right hand column row is set to a fixed width....in my case it's set to 21%, but you can set it to the actual width of the right hand image.

 

You'll notice that my banner looks proper for any size resolution, all the way up to 1200 width. You can see it adjust if you play with the width of your browser.

 

Hope this helps.

 

John

Link to comment
Share on other sites

John, that is a really nice banner you have there.

 

So this is something I am doing in header.php? I change something here ...

 

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

<tr class="header">

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

</tr>

</table>

 

 

or is it somewhere else?

Link to comment
Share on other sites

John, that is a really nice banner you have there. 

 

So this is something I am doing in header.php?    I change something here ...

 

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

  <tr class="header">

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

    </tr>

</table>

or is it somewhere else?

 

Thanks Kym,

 

Yes, you make the change to your header.php file within catalog/includes. You are in the right syntax to modify. Here's what the syntax should look like after you modify to get my exact effect:

 

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

<tr class="header">

<td align="left" background="ENTER THE SERVER LOCATION OF THE IMAGE YOU WANT TO USE FOR THE BACKGROUND"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'OVERWRITE OSCOMMERCE.GIF AND ENTER FILE NAME HERE', 'ENTER TEXT FOR MOUSE OVER HERE') . '</a>'; ?></td>

<td width="21%" align="left" valign="bottom"><?php echo tep_image(DIR_WS_IMAGES . 'ENTER NAME OF GRAPHIC FILE YOU WANT AS RIGHT COLUMN GRAPHIC', 'ENTER TEXT FOR RIGHT HAND IMAGE MOUSE OVER HERE'); ?>  </td>

</tr>

</table>

 

Be sure to upload the DIR_WS_IMAGES referenced to your catalog/images/ folder.

 

That should do it. Good Luck.

 

John

Link to comment
Share on other sites

My approach with streaching to full width and gifs:

 

I usually do the streaching with a table, set at width="100%". Then, where there is an image, I put that in with absolute pixel size for the image. So if the image is 100 x 50 pixels, i specify that exactly in the <img tag. Then if I want the image to blend into the background of the table (or its <td> cell) I make the background color of the <td> the same as the image. The I position the image within the cell using align= or valign=. By making the image size in the <img> tag the same as the actual image, the browser will render it faster.

Thanks,

 

David Watson

Link to comment
Share on other sites

I don't think you'd want to buy anything from my site anyway, Jack :)

I'm sorry if you took offense at my statment. It wasn't directed at your site. It was meant as a friendly suggestion. Many webmasters are not aware that having a site that is too wide to display is a sign of poor coding practices.

 

Jack

Support Links:

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

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

OK, I see you took offense once again. I think once you have been around the forums for a while and read some of my posts, you will find that that is not my style. I was trying to help. It is too bad you couldn't accept it as that.

 

Jack

Support Links:

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

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Jack I have been in IT 25 years.  What I am aware of is that people who configure osCommerce actualy think they know something about IT.

 

 

Jack is correct. Most internet users are running 800x600 screen resolutions. Having a site with horizontal scroll bars is one of the basic No-No's

 

Now as to how you took Jack's comments about screen resolution to people who configure osC actually think they know something about IT is Beyond Me.

 

...because if you want to be general about it, I am in the 'IT' field and am new to Web Development...they are totally different fields...no comparison....

 

"I would never ask a programmer to create a clone image of my system and upgrade my hard drive and then restore that clone image....and I would never ask a PC Hardware Technician to wrote code for a Restaurant POS system with specific custom code....."

 

Thanks Jack for all your help.

 

-TCwho-

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...