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

How can I add a graphic background in menu boxes?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 04-06-2005, 05:11 PM
 
nicole nicole is offline
 

Newbie
  
Join Date: Mar 2005
Posts: 4
 

Default How can I add a graphic background in menu boxes?

Hello there, I added a background graphic in the menu.tpl for the content like this :<TD background="{$ImagesDir}/cartBackground.gif">{$menu_content}
</TD>
(I tried also with style=no-repeat)
but I can still see the page background in the boxes. How can I get rid of this?
You can go see it:

http://companyweb.netspace25.com/clinage/store/home.php
__________________
Nicole
X-Cart Gold version 4.0.12
Windows
Reply With Quote
  #2  
Old 04-06-2005, 06:10 PM
 
balinor balinor is offline
 

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

Default

You would be better off setting the background image using CSS. The menu box is already controlled by a style in skin1.css, so just add the background image that way.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 04-06-2005, 08:59 PM
 
nicole nicole is offline
 

Newbie
  
Join Date: Mar 2005
Posts: 4
 

Default

Thanks for the information, but how can I do this. Which class should I modify in the css file? thanks
__________________
Nicole
X-Cart Gold version 4.0.12
Windows
Reply With Quote
  #4  
Old 04-07-2005, 01:48 AM
  pauldodman's Avatar 
pauldodman pauldodman is offline
 

X-Guru
  
Join Date: Jul 2003
Location: Spain / UK
Posts: 3,062
 

Default

Hi,

I have some help and a further query on this...

Firstly, to see what you need to edit, open up the template "menu.tpl"

This will show you how your table is built up, and includes class references, e.g. VertMenuTitle for the title box, VertMenuBox for the box, etc, etc.

You then need to edit the class in your css file, to look something like this, (for the title box)
.VertMenuTitle { color: white; font-weight: bold; background-image: url({$imagesDir}/nav_top.gif); background-repeat: no-repeat;}

which you will see also removes the repeat. Advised not to put the image reference in quotes.

However, my query is:

when I use the reference as above with the $imagesDir link, it doesn't display the image, only when putting a full reference, which of course we shouldn't do in x-cart.

can anyone help me solve this please?
__________________
Paul Dodman
e-business & m-commerce consultant
w: www.luminointernet.com
e: xcart@luminointernet.com

Professional X-Cart help, advice, support and services, specialists in Mobile X-Cart.
Reply With Quote
  #5  
Old 04-07-2005, 03:36 AM
 
balinor balinor is offline
 

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

Default

Just use images/imagename.jpg. Smarty doesn't work in the CSS file.
__________________
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 11:15 AM.

   

 
X-Cart forums © 2001-2020