Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Table width's and borders

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 04-25-2006, 11:08 AM
 
Grant Grant is offline
 

Senior Member
  
Join Date: Apr 2006
Posts: 171
 

Default Table width's and borders

Hi, take a look here - www.wyzeshop.com/store - and you'll see what I'm about to rant on about.

There seems to be a tiny gap between all of the menu boxes on the left of the screen that I can't seem to get rid of. Anybody know where the code is hiding that is causing this?

Also, Am I just being really stupid about table widths as I can't seem to get my templates to display properly. I'll set a width of say 159px for the left column but when the table is called it's way wider than that and messes up the middle and right columns too.

Cheers
__________________
X-Cart version : 4.0.18
Mod : Customer Also Bought
Mod : Custom catergory Templates
Mod : Custon Product Templates
Reply With Quote
  #2  
Old 04-25-2006, 11:15 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

Take a look at menu.tpl, it will show you what styles could be causing that border.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 04-25-2006, 01:08 PM
 
Grant Grant is offline
 

Senior Member
  
Join Date: Apr 2006
Posts: 171
 

Default

Quote:
Originally Posted by balinor
Take a look at menu.tpl, it will show you what styles could be causing that border.

Thanks again man

One other question - I can't seem to make the column run to the bottom of the page and meet up with the footer - http://wyzeshop.com/store/home.php?cat=7

When I try to label the table cell with a background colour (white) it stretches the table wider than the menu colums. I think this is due to my html editor (dreamweaver) and the fact that even though you can set the column widths by number when you drop the smarty code in there it stretches the column by about another 80px. In the code it is still saying that the width is set to 157px but on the wysiwyg it stretches the coloumn filling the background with the selected colour & this is somehow being replicated when home.tpl is called.

Here is the code for my home.tpl

Quote:
{* $Id: home.tpl,v 1.67.2.10 2005/10/31 11:36:14 max Exp $ *}
{if $printable ne ''}
{include file="customer/home_printable.tpl"}
{else}
{config_load file="$skin_config"}
<HTML>
<HEAD>
<TITLE>
{if $config.SEO.page_title_format eq "A"}
{section name=position loop=$location}
{$location[position].0|escape}
{if not %position.last%} :: {/if}
{/section}
{else}
{section name=position loop=$location step=-1}
{$location[position].0|escape}
{if not %position.last%} :: {/if}
{/section}
{/if}
</TITLE>
{ include file="meta.tpl" }
<LINK rel="stylesheet" href="{$SkinDir}/{#CSSFile#}"></HEAD>
<BODY leftmargin="0" topmargin="0" rightmargin="0" bottomargin="0" marginwidth="0" marginheight="0"{if $body_onload ne ''} onload="{$body_onload}"{/if}>
{ include file="rectangle_top.tpl" } {if $active_modules.SnS_connector}
{include file="modules/SnS_connector/header.tpl"} {/if}

<TABLE align="CENTER" border="0" cellpadding="0" cellspacing="0" width="953">

<TR>
<TD height="75" valign="top" colspan="2">http://www.wyzeshop.com/store/skin1/images/header/head_01.jpg</TD>
<td width="1"></td>
</TR>
<tr>
<td height="43" valign="top" background="http://www.wyzeshop.com/store/skin1/images/header/head_02.jpg" width="805">{if
$usertype eq "C"} { include file="customer/search.tpl" } {/if} </td>
<td width="147" rowspan="2" valign="top" background="http://www.wyzeshop.com/store/skin1/images/header/head_03.jpg"><div align="center"><font color="#FFFF99" size="1" face="Arial, Helvetica, sans-serif">



</font>
<font color="#FFFF99" size="1" face="Arial, Helvetica, sans-serif"><font color="#CCFF66" face="Verdana, Arial, Helvetica, sans-serif">{include
file="currency.tpl" value=$minicart_total_cost}
</font></font></div></td>
<td></td>
</tr>
<tr>
<td valign="top" rowspan="2" background="http://www.wyzeshop.com/store/skin1/images/header/head_04.jpg">{include
file="wyzenav.tpl"}</td>
<td height="16"></td>
</tr>
<tr>
<td valign="top" rowspan="2" background="http://www.wyzeshop.com/store/skin1/images/header/head_05.jpg"><div align="center">

view cart
| checkout
</div></td>
<td height="5"></td>
</tr>
<tr>
<td height="31" valign="top" background="http://www.wyzeshop.com/store/skin1/images/header/head_06.jpg"><div align="right">{include
file="printable.tpl"}</div></td>
<td></td>
</tr>
<tr>
<td height="1">[img]swingcity/images.gif[/img]</td>
<td>[img]swingcity/images.gif[/img]</td>
<td></td>
</tr>
</TABLE>
<table align="CENTER" width="953" border="0" cellspacing="0" cellpadding="0">

<tr>
<td valign="top" td width="184" border="0" height="84"><font size="1">{ include
file="customer/categories.tpl" } {if $login eq "" } { include file="auth.tpl"
} {else} { include file="authbox.tpl" } {/if}{ include file="news.tpl" }{
include file="modules/Bestsellers/menu_bestsellers.tpl" }{include file="customer/special.tpl"}{
include file="help.tpl" } </font></td>
<td width="19"></td>
<td width="602" valign="top">

{include file="location.tpl"} {include file="dialog_message.tpl"} {if $active_modules.Special_Offers
ne ""} {include file="modules/Special_Offers/customer/new_offers_message.tpl"}
{/if} {include file="customer/home_main.tpl"}

</td>
<td width="148"></td>
</tr>
<tr>
<td height="32" colspan="4" valign="top">http://www.wyzeshop.com/store/skin1/images/footer.jpg</td>
</tr>
</table>
<div align="center"> </div>
</BODY>
</HTML>
{/if}

I can see that after uploading it the table width has changed to 184px - when I try to change this manually to 157px from the edit templates section in x-cart admin it gives me a File couldn't be saved error?

Is there anyway around this. Or am I just missing something obvious?
__________________
X-Cart version : 4.0.18
Mod : Customer Also Bought
Mod : Custom catergory Templates
Mod : Custon Product Templates
Reply With Quote
  #4  
Old 04-25-2006, 01:26 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

Do you have the smarty plug-in for Dreamweaver? If not, you are probably shooting yourself in the foot by using DW.

Be sure to call your images using smarty, and code your table cells using CSS, not the old fashioned way like you have:

background="http://www...etc" will cause all sorts of issues, but mainly security issues when you go into https.

Get yourself a good book on CSS, it is the standard for formatting these days.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #5  
Old 04-25-2006, 01:29 PM
 
Grant Grant is offline
 

Senior Member
  
Join Date: Apr 2006
Posts: 171
 

Default

Haha fixed it!

Ok so Word Pad is my new best friend
__________________
X-Cart version : 4.0.18
Mod : Customer Also Bought
Mod : Custom catergory Templates
Mod : Custon Product Templates
Reply With Quote
  #6  
Old 04-25-2006, 01:32 PM
 
Grant Grant is offline
 

Senior Member
  
Join Date: Apr 2006
Posts: 171
 

Default

Thanks for all your help so far balinor - if I become too much of a pain just say
__________________
X-Cart version : 4.0.18
Mod : Customer Also Bought
Mod : Custom catergory Templates
Mod : Custon Product Templates
Reply With Quote
  #7  
Old 04-25-2006, 01:32 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

Ya...edit the templates right in X-Cart or use your favorite text editor. Ultraedit is a VERY good editor.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #8  
Old 04-26-2006, 11:51 AM
 
Grant Grant is offline
 

Senior Member
  
Join Date: Apr 2006
Posts: 171
 

Default

Quote:
Originally Posted by balinor
Be sure to call your images using smarty, and code your table cells using CSS, not the old fashioned way like you have:

background="http://www...etc" will cause all sorts of issues, but mainly security issues when you go into https.

I know how to call a regular image with smarty code but how would I call a background image?
__________________
X-Cart version : 4.0.18
Mod : Customer Also Bought
Mod : Custom catergory Templates
Mod : Custon Product Templates
Reply With Quote
  #9  
Old 04-26-2006, 11:51 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

background: url(images/imagename.jpg);
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 02:00 AM.

   

 
X-Cart forums © 2001-2020