Thie i18n menu will only hyperlink the text that is in the drop menu, and not the full drop menu item "box" itself. In other words, if you click to the right or left of the text in a drop menu, it is not hyperlinked.
(2013-02-25, 04:54:30)j*z Wrote: Has anyone found a work-around for this issue:
Thie i18n menu will only hyperlink the text that is in the drop menu, and not the full drop menu item "box" itself. In other words, if you click to the right or left of the text in a drop menu, it is not hyperlinked.
Use custom rendering.
But I don't think HTML allows you to put a <ul> inside a <a> (also browsers will probably render it).
2013-02-26, 07:03:01 (This post was last modified: 2013-02-26, 07:05:28 by yojoe.)
Display the 'a' elements in your drop down menu to as a block items in css.
Anchors are by default an inline elements.
And add padding directly to them, not to 'li' elements.
Addons: blue business theme, Online Visitors, Notepad
2013-02-26, 10:22:10 (This post was last modified: 2013-02-26, 10:27:25 by j*z.)
(2013-02-26, 07:03:01)yojoe Wrote: Display the 'a' elements in your drop down menu to as a block items in css.
Anchors are by default an inline elements.
And add padding directly to them, not to 'li' elements.
I added display: block; to any CSS involved in the drop menu, but that didn't have any effect. Where were you suggesting I put the display: block?
(2013-02-26, 09:29:05)Psychosopher Wrote:
(2013-02-26, 07:03:01)yojoe Wrote: Display the 'a' elements in your drop down menu to as a block items in css.
I copied in the meantime the page. The problem seems to be that the CSS for the navigation is very nested.
When you display the a-tag as block, then there are a lot of margins and paddings. I think because of this the block becomes very small.
Thanks for your help Psychosopher.
I removed all the margins and padding with the drop down menu but still just the text in the drop down was hyperlinked. The drop menu box itself was not. (I put the padding back in after I was done testing)
I call the menu from my template page like this:
<div class="sitemenu">
<ul><?php get_i18n_navigation(return_page_slug(),0,1,I18N_SHOW_MENU); ?></ul>
2013-02-27, 08:13:27 (This post was last modified: 2013-02-27, 13:54:24 by j*z.)
Thanks mvlcek, Joe and Psychosopher for your tips. I removed all the padding and margin and the hyperlink works correctly now. However, that made it hard to control my padding. I created a width of 110%, centered my text, and forced the height to 25px. That got me close to where I wanted to be visually, but the link text will align to the top.
Joe mentioned the "a" elements can be styled and I tried that. This looks great and I tested it cross browser + platform, so I'd say it's a fix.
.sitemenu li ul li a:link {padding-top:5px;display:block;}
.sitemenu li ul li a:visited {padding-top:5px;display:block;}
.sitemenu li ul li a:hover {padding-top:5px;display:block;}
.sitemenu li ul li:hover a:link {padding-top:5px;display:block;}
.sitemenu li ul li:hover a:visited {padding-top:5px;display:block;}
.sitemenu li ul li:hover a:hover {padding-top:5px;display:block;}
"mvlcek" suggested Custom Rendering but that looks to be outside my skill-set.