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

i can't center images in menu titles!

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 11-04-2003, 04:37 AM
 
AKR AKR is offline
 

eXpert
  
Join Date: Oct 2003
Location: the edge of insanity
Posts: 233
 

Default i can't center images in menu titles!

i've tried various things (and searched these forums among others), and i just don't know enough about html, or something is screwy. i just don't know what i'm doing wrong. here's my code for the menu.tpl. the titletest.jpg is what i'm trying to center:

<TABLE border=1 cellPadding=5 cellSpacing=0 width="100%" style="border-collapse: collapse" bordercolor="#FFFFFF">
<TR>
{if $link_href}
<div style="text-align:center">
<TD align="center" class=VertMenuTitle background="{$ImagesDir}/titletest.jpg" style="background-repeat: no-repeat" height=26 align=center valign=center width=100% font class=VertMenuTitle>
<font color="#000000"></font><font color="#000000">{$menu_title}</font></font></TD>
{else}
<TD align="center" class=VertMenuTitle background="{$ImagesDir}/titletest.jpg" style="background-repeat: no-repeat" height=26 align=center valign=center width=100%
<font class=VertMenuBoxNewsTitle color="#000000"> {$menu_title}</font></TD>
{/if}
</TR>
<TR>
<TD colspan="2" class=VertMenuBox>{$menu_content}
</TD></TR>
</TABLE>


thanks in advance for any help. i know you guys get lame questions like this all the time. Reuben
Reply With Quote
  #2  
Old 11-04-2003, 06:09 AM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

try something more like this

Code:
<TABLE border=0 cellPadding=5 cellSpacing=0 width="100%"> <TR> <TD class=VertMenuTitle height=26>{$link_begin}[img]{$ImagesDir}/{$dingbats}[/img]{$link_end}</TD> {if $link_href} <TD width=80% height=26 align="center" valign=center class=VertMenuTitle>[img]{$ImagesDir}/titletest.jpg[/img] </TD> {else} <TD width=80% height=26 align="center" valign=center class=VertMenuTitle>[img]{$ImagesDir}/titletest.jpg[/img]</TD> {/if} </TR> <TR> <TD colspan="2" class=VertMenuBox>{$menu_content} </TD></TR> </TABLE>
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #3  
Old 11-07-2003, 08:23 PM
 
AKR AKR is offline
 

eXpert
  
Join Date: Oct 2003
Location: the edge of insanity
Posts: 233
 

Default

that code had dingbats and no menu titles in it. i played around with it a bit, and got this far:

<TABLE border=1 cellPadding=3 cellSpacing=0 width="100%" bordercolor="#FFFFFF">
<TR>
{if $link_href}
<div style="text-align:center">
<TD background="{$ImagesDir}/titletest.jpg" width=80% height=26 align="center" valign=center class=VertMenuTitle><font color="#000000"> </font><font color="#000000">{$menu_title}</font></td>
{else}
<TD width=80% height=26 align="center" valign=center class=VertMenuTitle color="#000000"> {$menu_title}</font>[img]{$ImagesDir}/titletest.jpg[/img]
{/if}
</tr>
<TR>
<TD colspan="2" class=VertMenuBox>{$menu_content}
</td></tr>
</table>

now, i've gotten rid of the dingbats, have the picture centered, but the title is above it instead of on it.
Reply With Quote
  #4  
Old 11-08-2003, 01:53 PM
  groovico's Avatar 
groovico groovico is offline
 

X-Man
  
Join Date: Apr 2003
Location: Firetanksoftware.com
Posts: 2,326
 

Default

class=VertMenuTitle <<

Do it in the style sheet, you can set text alignment from CSS level without having to touch the tpls
__________________
Groovico

Used by X-carters the world over:
Marketing Manager Pro Bundle For X-cart
Featured Product Manager for X-cart
Feed manager pro for X-cart

http://www.firetanksoftware.com

Celebrating 7 Years of providing quality X-cart Add ons and X-cart Mods for x-cart 3.X to X-cart 4.4.X
Reply With Quote
  #5  
Old 11-09-2003, 06:20 AM
 
AKR AKR is offline
 

eXpert
  
Join Date: Oct 2003
Location: the edge of insanity
Posts: 233
 

Default

it's the image i'm having problems with, though. i can do the same thing with an image in css, though, right? i'm just not sure how.
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 11:29 AM.

   

 
X-Cart forums © 2001-2020