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 »
  • Menu CSS not showing correct
  • Print
Pages: [1]   Go Down

Author Topic: Menu CSS not showing correct  (Read 6875 times)

daydreamer

  • Guest
Menu CSS not showing correct
« on: February 10, 2009, 03:20:17 PM »
Hi This is my menu CSS how do I get menu to display correct?
I am using,
<?php show_menu2(0, SM2_ROOT, SM2_START, '<ul>' , '<li id="menu">[a][menu_title]</a>', '</li>' , '</ul>', '', ''); ?>

#menu {
    float:left;
    width:695px;
    font-size:93%;
    line-height:normal;
    border-bottom:1px solid #666;
    }
#menu ul {
    margin:0;
    padding:10px 10px 0 50px;
    list-style:none;
    }
#menu li {
    display:inline;
    margin:0;
    padding:0;
    list-style-type: none;
    }
#menu a {
    float:left;
    margin:0;
    text-decoration:none;
    background-image: url(/templates/home/images/tabs_left.png);
    background-repeat: no-repeat;
    background-position: left top;
    padding-top: 0;
    padding-right: 0;
    padding-bottom: 0;
    padding-left: 9px;
    }
#menu a span {
    float:left;
    display:block;
    padding:5px 15px 4px 6px;
    color:#FFF;
    background-image: url(/templates/home/images/tabs_right.png);
    background-repeat: no-repeat;
    background-position: right top;
    }
   
/* Commented Backslash Hack hides rule from IE5-Mac \*/
#menu a span {float:none;}
/* End IE5-Mac hack */
#menu a:hover span {color:#FFFFFF;}
#menu a:hover {background-position:0% -42px;}
#menu a:hover span {background-position:100% -42px;} 
Logged

erpe0812

  • Guest
Re: Menu CSS not showing correct
« Reply #1 on: February 10, 2009, 04:55:13 PM »
Hi,

a link to your site woudl be helpful to see what's wrong.

rgds

erpe
Logged

Offline marathoner

  • Posts: 495
Re: Menu CSS not showing correct
« Reply #2 on: February 10, 2009, 10:15:37 PM »
Yup...a link would be helpful. Also, more helpful to know what you "want" it to do rather than use the term correctly since I'm sure that it's already displaying "correctly" based on how it's currently set up.

Just a guess here...but I doubt that you want to use the square brackets around your A tag. Use <a> instead of [a].

Also, I'd guess that you want to use the CSS ID "menu" around the whole menu and not at each LI tag.
Logged

Offline Ruud

  • Posts: 3671
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: Menu CSS not showing correct
« Reply #3 on: February 10, 2009, 11:02:06 PM »
The 4th parameter of the show_menu2 function is wrong. That might give some unexpected results.
Code: [Select]
<?php show_menu2(0, SM2_ROOT, SM2_START, &#39;<ul>&#39; , &#39;<li id="menu">[a][menu_title]</a>&#39;, &#39;</li>&#39; , &#39;</ul>&#39;, &#39;&#39;, &#39;&#39;); ?>See: http://code.jellycan.com/files/show_menu2-README.txt

Quote from: marathoner on February 10, 2009, 10:15:37 PM
Just a guess here...but I doubt that you want to use the square brackets around your A tag. Use <a> instead of [a].
Using the [a] instead of<a> will add the show_menu classes to the <a> tag that is generated. Nothing wrong with that.


Quote from: daydreamer on February 10, 2009, 03:20:17 PM
Hi This is my menu CSS how do I get menu to display correct?
The CSS is styled using the "Sliding Doors" technique.
For this the link must be in a span tag.

An example to do that using show_menu2 is:
Code: [Select]
<?php show_menu2(1,SM2_ROOT,SM2_ROOT,SM2_TRIM,&#39;[li][a]<span>[menu_title]</span></a>&#39;,&#39;</li>&#39;); ?>
If this is put in within a <div id="menu"> </div>, it might just work. :wink:

Ruud

Edit: Here is a nice article on the Sliding Doors menu technique. Good for trying to understand how CSS works for you.
« Last Edit: February 10, 2009, 11:07:55 PM by Ruud »
Logged
Dev4me - WebsiteBaker modules - WBhelp.org

daydreamer

  • Guest
Re: Menu CSS not showing correct
« Reply #4 on: February 10, 2009, 11:23:30 PM »
Thanks Ruud
This worked
<?php show_menu2(1,SM2_ROOT,SM2_ROOT,SM2_TRIM,'
  • [a]<span>[menu_title]</span></a>','</li>'); ?>

    But for some strange reason the menu items are not linking???
Logged

Offline Ruud

  • Posts: 3671
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: Menu CSS not showing correct
« Reply #5 on: February 10, 2009, 11:41:13 PM »
Quote from: daydreamer on February 10, 2009, 11:23:30 PM
But for some strange reason the menu items are not linking???

Have a look at the generated source of the page to see what is wrong.
It should display something like:

Code: [Select]
<ul class="menu-top">
  <li class="menu-current menu-first"><a href="http://www.yourserver.com" target="_top"><span>Home</span></a></li>
  <li class="menu-sibling"><a href="http://www.yourserver.com/pages/faq.php" target="_top"><span>Faq</span></a></li>
  <li class="menu-sibling"><a href="http://www.yourserver.com/pages/contact.php" target="_top"><span>Contact</span></a></li>
</ul>

So a bit simplified:
 
Code: [Select]
<li><a href="url"><span>text</span></a></li>If it looks like that, and still doesn't work... give us a link so we can see what is going on.

Ruud
Logged
Dev4me - WebsiteBaker modules - WBhelp.org

daydreamer

  • Guest
Re: Menu CSS not showing correct
« Reply #6 on: February 10, 2009, 11:44:10 PM »
Looks like this

<div id="menu">
   <ul class="menu-top"><li><a><span>new</span></a></li></ul>
</div>

No link there
Logged

daydreamer

  • Guest
Re: Menu CSS not showing correct
« Reply #7 on: February 10, 2009, 11:50:21 PM »
Thanks got it sorted working with this

<?php show_menu2(2,SM2_ROOT,SM2_ROOT,SM2_TRIM, '<li>[a]<span>[menu_title]</span></a>','</li>'); ?>

Thanks Ruud
Logged

Offline Ruud

  • Posts: 3671
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: Menu CSS not showing correct
« Reply #8 on: February 10, 2009, 11:52:46 PM »
Y'r welcome,

Hope to see the result in the showcase forum some day.

Ruud
Logged
Dev4me - WebsiteBaker modules - WBhelp.org

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • Menu CSS not showing correct
 

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