留言板

First and last item in navigation portlet because rounded corner

thumbnail
Norbert Bede,修改在14 年前。

First and last item in navigation portlet because rounded corner

Junior Member 帖子: 38 加入日期: 09-4-19 最近的帖子
hi,

we want to set for the first and last item in navigation menu rounded corners. Sometimes navigation with the same css should have for example 4 items and sometimes 7 (or any other). In the first case we want to assign "first" class to 1st itme and class "last" to the 4th item. These two classess will have special "rounded" elements.

Is there any solution ?
Tomasz Grysztar,修改在14 年前。

RE: First and last item in navigation portlet because rounded corner

Junior Member 帖子: 29 加入日期: 09-5-6 最近的帖子
If you don't care about the old browsers, then using :first-child and :last-child selectors is perhaps the simplest solution.

If that doesn't work for you, you may create a hook plugin to replace /html/taglib/ui/navigation/page.jsp file with your customized version, that would add some special CSS classes to first and last LI elements.