WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • #SOLVED# Different menu images: how to format show_menu2 output?
  • Print
Pages: [1]   Go Down

Author Topic: #SOLVED# Different menu images: how to format show_menu2 output?  (Read 8107 times)

Chaploo

  • Guest
#SOLVED# Different menu images: how to format show_menu2 output?
« on: November 03, 2008, 11:46:45 AM »
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: [Select]
<div id="menu"><?php show_menu2(0, SM2_ROOT+1, SM2_CURR+1, SM2_TRIM,&#39;<li><a class="[page_id]">[menu_title]</a>&#39;, &#39;</li>&#39;, &#39;<ul>&#39;, &#39;</ul>&#39;); ?>

which gives me a fine html output of

Code: [Select]
<div id="menu"><ul><li class="33"><a href="http://www.example.de/pages/de/test.php" target="_top">Test</a></li>
But unfortunately I can't find a way to format this link via css. I tried

Code: [Select]
#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;
}

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

« Last Edit: November 03, 2008, 03:19:50 PM by Chaploo »
Logged

Offline Ruud

  • Posts: 3671
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: Different menu images: how to format show_menu2 output?
« Reply #1 on: November 03, 2008, 11:59:45 AM »
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
Logged
Dev4me - WebsiteBaker modules - WBhelp.org

Chaploo

  • Guest
Re: Different menu images: how to format show_menu2 output?
« Reply #2 on: November 03, 2008, 12:31:22 PM »
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
Logged

Offline Ruud

  • Posts: 3671
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: Different menu images: how to format show_menu2 output?
« Reply #3 on: November 03, 2008, 02:04:26 PM »
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
Logged
Dev4me - WebsiteBaker modules - WBhelp.org

Chaploo

  • Guest
Re: Different menu images: how to format show_menu2 output?
« Reply #4 on: November 03, 2008, 02:58:15 PM »
Quote from: Ruud on November 03, 2008, 02:04:26 PM
Currently there are no CSS selectors for those classes in your stylesheet.

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
Logged

Offline Ruud

  • Posts: 3671
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: Different menu images: how to format show_menu2 output?
« Reply #5 on: November 03, 2008, 03:11:48 PM »
The problem is that - according to the CSS specs - a class id cannot start with a numeric value.

If you add just a fixed character in your show_menu2 call (generating class="c33") and do the same for your CSS it will work (without the whitespace!)

Ruud
Logged
Dev4me - WebsiteBaker modules - WBhelp.org

Chaploo

  • Guest
Re: Different menu images: how to format show_menu2 output?
« Reply #6 on: November 03, 2008, 03:19:29 PM »
GREAT!!! It works!

Thank you so much!

Regards
Jochen
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • #SOLVED# Different menu images: how to format show_menu2 output?
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2