WebsiteBaker Support (2.8.x) > Templates, Menus & Design
#SOLVED# Different menu images: how to format show_menu2 output?
Chaploo:
Hi everybody,
I tried to put different background images to every menu item on a multilanguage WB 2.7 site and finally ended - after studying the several threads to this topic in the forum - with this:
--- Code: ---<div id="menu"><?php show_menu2(0, SM2_ROOT+1, SM2_CURR+1, SM2_TRIM,'<li><a class="[page_id]">[menu_title]</a>', '</li>', '<ul>', '</ul>'); ?>
--- End code ---
which gives me a fine html output of
--- Code: ---<div id="menu"><ul><li class="33"><a href="http://www.example.de/pages/de/test.php" target="_top">Test</a></li>
--- End code ---
But unfortunately I can't find a way to format this link via css. I tried
--- Code: ---#menu li .33 a {
text-align:right;
font-size: 16px;
font-weight:bold;
color:#cc0000;
background:url(image.gif) top right no-repeat;
margin:0;
padding-right:20px;
height:30px;
line-height:30px;
text-decoration:none;
border-top:1px solid #fff;
display:block;
}
--- End code ---
with different variations. But nothing seems to work. Does anybody know why? :?
I know, this is more like a css questions, but it seems like it has to do with the show_menu2 code, so I desperately hope I can find answers in this forum. :-)
Thanks in advance,
regards
Jochen
Ruud:
What you are describing should work.
What you are not describing might be the problem ;-)
Other CSS data might overwrite this selector.
Do you have a link where we can have a look?
(Don't just post your complete CSS. That would require to setup a site like yours before someone is able to debug)
Ruud
Chaploo:
Thanks for your reply.
You can view the site on my test Wb system:
http://www.internet-service-berlin.de/wb27/pages/de/startseite.php
(Don't use the links underneath the main menu, they are connected to another site.)
Regards
Jochen
Ruud:
Currently there are no CSS selectors for those classes in your stylesheet.
Can you add the #menu li.33 a { part again? (also remove the whitespace between li and .33)
Ruud
Chaploo:
--- Quote from: Ruud on November 03, 2008, 02:04:26 PM ---Currently there are no CSS selectors for those classes in your stylesheet.
--- End quote ---
Which ones do yo mean?
The url to the css file is
http://www.internet-service-berlin.de/wb27/templates/zeuthen_de/screen.css
I removed the space, but no effect. :-(
Regards
Jochen
Navigation
[0] Message Index
[#] Next page
Go to full version