PDA

View Full Version : No link under spry menu item..


gore.m
11-02-2010, 03:07 PM
Is it possible remove link under unused spry menu item?

I mean, when people are trying click on one item in my menubar they cant, because I dont want to have link there, there is only "#" instead of link.

But for people is "Hand" under empty menu item confusing.
Is it possible to have only an arrow instead of hand above unused spry menu item?


code example
<li><a href="#" class="MenuBarItemSubmenu">Ostatn&iacute; aranžm&aacute;</a>
<ul>
<li><a href="dusickova-vazba-brno.html" title="Dušičková vazba">Dušičky</a></li>
<li><a href="vánocní-dekorace-brno.html" title="Vánoční dekorace">V&aacute;noce</a></li>
thanks you

DWcourse
11-02-2010, 04:42 PM
You could create a CSS rule with the cursor: default property set and apply it to the non-functional links.

gore.m
11-02-2010, 05:17 PM
You could create a CSS rule with the cursor: default property set and apply it to the non-functional links.

Thanks you very much for your reply.
Im afraid I need little more explanation :)

thanks you

DWcourse
11-02-2010, 06:14 PM
You can create a CSS style rule like this:

<style type="text/css">
.normalCursor {
cursor: default;
}
</style>

The cursor property is listed under the Extensions category in Dreamweaver's CSS Rule Definition dialog.

Then you would apply the style to the link where you don't want the cursor to change:

<a href="#" class="normalCursor">text link</a>

gore.m
11-02-2010, 06:27 PM
Thanks you very much.

I have done this:

I made new CSS rule:
.normalCursor {
cursor: default;
}and I changed code to this:
<li><a href="#" class="normalCursor">Dárkové kytice</a>
<ul>But nothing happend :p

DWcourse
11-02-2010, 06:31 PM
My bad. You need to overwrite the CSS rule from the spry css so you need to be more specific with your selector. Try this:

ul.MenuBarVertical a.normalCursor {
cursor: default;
}

gore.m
11-02-2010, 06:47 PM
Ok I add new rule to spry

called: ul.MenuBarVertical a.normalCursor, than I add: cursor - default

and code

<li><a href="#" class="ul.MenuBarVertical a.normalCursor">Dárkové kytice</a>
<ul>

Nothing happend :p

DWcourse
11-02-2010, 07:39 PM
no, the html should still be:

<li><a href="#" class="normalCursor">Dárkové kytice</a>
<ul>

The style class is still normalCursor. The ul.MenuBarVertical a in the CSS selector simply limits the rule to only apply when the class normalCursor is applied to a link within the menu.

Also be aware that the CSS I gave you was for a vertical menu. If you have a horizontal menu you'll need to adjust it.

gentleone
11-02-2010, 07:49 PM
It only have to trigger the mouse enter event, so I believe no href at all should also work.

Instead of this:

<li><a href="#" class="MenuBarItemSubmenu">Ostatn&iacute; aranžm&aacute;</a>
this:

<li><a class="MenuBarItemSubmenu">Ostatn&iacute; aranžm&aacute;</a>

gore.m
11-02-2010, 08:04 PM
OK, I have changed all to this:

ul.MenuBarHorizontal a.normalCursor { cursor:
default;
}
<li><a href="#" class="normalCursor">Dárkové kytice</a> <ul>
Nothing happend.

I also tried change code to this:

<li><a class="MenuBarItemSubmenu">Ostatn&iacute; aranžm&aacute;</a>Than there is no link, but hand above emty item is still there. :sad:

DWcourse
11-03-2010, 05:55 AM
Sorry, it's been a rough day and I haven't been very good with this question :confused: . If you'd like the normal cursor on ALL the items with submenus this should work (fingers crossed :) ):

In the ul.MenuBarVertical a.MenuBarItemSubmenu style rule add the following property:

cursor:default;

You'll need to change the link code back to <a class="MenuBarItemSubmenu"> and you can forget the normalCursor style rule altogether.

gore.m
11-03-2010, 07:02 PM
Thanks you for your reply!
Yes, with your help I have done normal cursor on ALL the items of menu.:)
But I would like to have normal cursor only on empty items (items without link) and hand cursor on items with link.
Is it possible?

thanks you

gentleone
11-03-2010, 08:05 PM
I did it before to drop the hand cursor on an anchor tag by dropping the href attribute, but it might be that a spry drop down menu relies on the href attribute in the javascript file in order to work. I'm not familiar with spry so I don't know that. You know that there are CSS althernatives to have a (multilevel) dropdown menu?

DWcourse
11-03-2010, 09:41 PM
A change to the rule ul.MenuBarVertical a.MenuBarItemSubmenu (that's one rule) affects only the items with submenus. And that's what it does in my tests.

Dreamweaver does rely on the anchor <a> tag to style the menu and apply the cursor: pointer property to the <a> tag so simply removing the href="#" won't do the trick.

gore.m
11-04-2010, 08:38 AM
A change to the rule ul.MenuBarVertical a.MenuBarItemSubmenu (that's one rule) affects only the items with submenus. And that's what it does in my tests.

Dreamweaver does rely on the anchor <a> tag to style the menu and apply the cursor: pointer property to the <a> tag so simply removing the href="#" won't do the trick.

THANKS YOU :D It works

gentleone
11-04-2010, 04:10 PM
Dreamweaver does rely on the anchor <a> tag to style the menu and apply the cursor: pointer property to the <a> tag so simply removing the href="#" won't do the trick.
Okay... good to know.

DWcourse
11-04-2010, 07:45 PM
THANKS YOU :D It works

Glad we finally got it figured out. Some days things are just harder than they should be.