![]() |
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 |
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.
|
Thanks for the information, but how can I do this. Which class should I modify in the css file? thanks
|
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? |
Just use images/imagename.jpg. Smarty doesn't work in the CSS file.
|
All times are GMT -8. The time now is 12:38 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.