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

Rounded Corners - Almost there but not quite

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 01-29-2005, 03:45 PM
 
wayfarer wayfarer is offline
 

Advanced Member
  
Join Date: Apr 2003
Posts: 56
 

Default Rounded Corners - Almost there but not quite

Hi all,

I'm trying to round the bottom corners of my dialog.tpl dialog box and am almost there. I am trying to insert a 3 column table with corner graphics on either side. So far I have my left graphic where I want it but the right corner image is half way along the box. I am assuming that there is a two column structure somewhere in behind this and that the image is conforming to the edge of the first column, but I just can't seem to get the code right to deal with it (I am used to working in WYSIWYG and am a little rusty on hard coding in notetab).

Here's my dialog.tpl (working with 4.0.4, standard theme):

Code:
{* $Id: dialog.tpl,v 1.19 2004/06/24 09:53:29 max Exp $ *} {if $printable ne ''} {include file="dialog_printable.tpl"} {else} <TABLE border="0" cellpadding="0" cellspacing="0" {$extra}> <TR> <TD style= "border-right: 1px solid #9C9EAA; border-bottom: 1px solid #9C9EAA;" height="23" class="DialogTitle" background="{$ImagesDir}/dialog_bg_n.gif" valign="middle">{$title}</TD> </TR> <TR><TD style= "border-right: 1px solid #9C9EAA; border-left: 1px solid #9C9EAA;" class="DialogBorder"><TABLE border="0" cellpadding="10" cellspacing="0" width="100%"> <TR><TD class="DialogBox">{$content} </TD></TR> </TABLE><tr> <td colspan="2"> <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="white"> <tr> <td width="9"> <div align="left"> [img]{$ImagesDir}/smalldialogcnr_left.gif[/img]</div> </td> <td></td> <td width="9"> <div align="right"> [img]{$ImagesDir}/smalldialogcnr_right.gif[/img]</div> </td> </tr> </table> </td> </tr> </td><TD></TR> </TABLE> {/if}


And here's an example of the result:

http://www.wayfarer.co.nz/forumexamples/images/cornersdemo.gif

What should I change to get that pesky right hand corner graphic over to the right where it belongs?
Reply With Quote
  #2  
Old 01-29-2005, 06:01 PM
 
balinor balinor is offline
 

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

Default

You have an empty cell between the two corner images:

<td></td>

Put a spacer gif in there or at least define the cell width and add a

That should fix the problem.

Also, FYI you can paste a template into Dreamweaver or your favorite WYSIWYG editor to help you view some of the more complex nested tables. It can't read Smarty, but it can at least give you an idea of what cell is what
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 01-29-2005, 06:38 PM
 
wayfarer wayfarer is offline
 

Advanced Member
  
Join Date: Apr 2003
Posts: 56
 

Default

Great thanks! I've got it sussed now. I didn't think I could give the central cell a value, because I want it to expand and contract with the browser. But I gave it a value of 100% and it did the trick!
Reply With Quote
  #4  
Old 01-30-2005, 06:20 AM
  eaglemobiles's Avatar 
eaglemobiles eaglemobiles is offline
 

Senior Member
  
Join Date: Jan 2005
Posts: 167
 

Default Hi, wayfarer

I want the same style could you please post your code so i can put in my store please.

Thanks
__________________
X-Cart Gold 4.3.2
X-Cart Gold 4.4.1
Unix

High Quality CCTV DVRs & Cameras
http://www.eaglemobiles.co.uk/CCTV
Reply With Quote
  #5  
Old 01-30-2005, 06:29 AM
 
balinor balinor is offline
 

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

Default

He did, it is right there at the top of the thread
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #6  
Old 01-30-2005, 06:31 AM
  eaglemobiles's Avatar 
eaglemobiles eaglemobiles is offline
 

Senior Member
  
Join Date: Jan 2005
Posts: 167
 

Default

But i dont know how make that changes you told him, Many thanks for reply

Nice one
__________________
X-Cart Gold 4.3.2
X-Cart Gold 4.4.1
Unix

High Quality CCTV DVRs & Cameras
http://www.eaglemobiles.co.uk/CCTV
Reply With Quote
  #7  
Old 01-30-2005, 06:34 AM
 
balinor balinor is offline
 

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

Default

Replace:

<td></td>

with

<td width="100%></td>

You are also going to need to create your own rounded corner .gif images.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #8  
Old 01-30-2005, 06:52 AM
  eaglemobiles's Avatar 
eaglemobiles eaglemobiles is offline
 

Senior Member
  
Join Date: Jan 2005
Posts: 167
 

Default

Here is my code but I dont know how to make is round corner,

{* $Id: dialog.tpl,v 1.19 2004/06/24 09:53:29 max Exp $ *}
{if $printable ne ''}
{include file="dialog_printable.tpl"}
{else}
<TABLE border="0" cellpadding="0" cellspacing="0" {$extra}>
<TR>
<TD height="15" class="DialogTitle" background="{$ImagesDir}/dialog_bg_n.gif" valign="bottom">{$title}</TD>
</TR>
<TR><TD class="DialogBorder"><TABLE border="0" cellpadding="10" cellspacing="1" width="100%">
<TR><TD class="DialogBox">{$content}

</TD></TR>
</TABLE></TD></TR>
</TABLE>
{/if}
__________________
X-Cart Gold 4.3.2
X-Cart Gold 4.4.1
Unix

High Quality CCTV DVRs & Cameras
http://www.eaglemobiles.co.uk/CCTV
Reply With Quote
  #9  
Old 01-30-2005, 06:56 AM
 
balinor balinor is offline
 

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

Default

I'm afraid you are not going to just be able to copy his code, you are going to need to create your own .gif images for the rounded corners. If you don't know how to do that, you can do a search on the web and find quite a few examples/tutorials.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #10  
Old 01-30-2005, 06:59 AM
  eaglemobiles's Avatar 
eaglemobiles eaglemobiles is offline
 

Senior Member
  
Join Date: Jan 2005
Posts: 167
 

Default

Ok thanks, I will, to sort it out as i am new to this coding stuff.

Thanks for your time
__________________
X-Cart Gold 4.3.2
X-Cart Gold 4.4.1
Unix

High Quality CCTV DVRs & Cameras
http://www.eaglemobiles.co.uk/CCTV
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 12:24 PM.

   

 
X-Cart forums © 2001-2020