[support] How to get last item in secondary menu to not
haveborder on right?
Larry Garfield
larry at garfieldtech.com
Sat Sep 2 04:44:27 UTC 2006
On Friday 01 September 2006 13:33, Jody Cleveland wrote:
> > Why not just use Drupal's menu system? By default it puts a
> > vertical separator betwenn each item.
>
> Really? How do I set that? The only way I've been able to add a vertical
> separator is by adding it in the stylesheet. But, then you get the one
> to the right of the last item too.
>
> - jody
If you want a pure-CSS solution using content-generation, which works great in
everything but IE and fails miserably in IE because IE doesn't do content
generation, try something like this:
ul#primary li:after {
content: "|";
}
ul#primary li:last-child:after {
content: "";
}
If you want to use borders, the same trick is possible but still doesn't work
in IE because IE doesn't understand last-child:
ul#primary li {
border-right: 1px solid white;
}
ul#primary li:last-child {
border-right: 0px;
}
If you want an HTML-based solution, you'd put something vaguely like this in
your page.tpl.php file:
print implode(' | ', $primary_links);
(Note that the above means you'll get a string of links, NOT a <ul> of links.
--
Larry Garfield AIM: LOLG42
larry at garfieldtech.com ICQ: 6817012
"If nature has made any one thing less susceptible than all others of
exclusive property, it is the action of the thinking power called an idea,
which an individual may exclusively possess as long as he keeps it to
himself; but the moment it is divulged, it forces itself into the possession
of every one, and the receiver cannot dispossess himself of it." -- Thomas
Jefferson
More information about the support
mailing list