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.