Login | Forgot password | Register
What is OpenID?
OpenID is an Internet-wide identity system that allows you to sign in to many websites with a single account.
With OpenID, your ID becomes a URL (e.g. http://username.myopenid.com/). You can get a free OpenID for example from myopenid.com.
For more information visit the official OpenID site.
Archive
SilverStripe Forums » Archive » Different CSS for last link in a menu
Our old forums are still available as a read-only archive.
|
Page:
1
|
Go to End | |
| Author | Topic: Different CSS for last link in a menu | 573 Views |
-
Different CSS for last link in a menu

21 June 2008 at 3:31am Last edited: 21 June 2008 3:32am
Say I have 5 links in the main menu, I would like to specify a separate class value for the last link in the list to achieve something like this
Link 1 | link 2 | link 3 | link 4 | link 5
notice the missing "border-right" on link 5...
any help would be greatly appreciated!!
-
Re: Different CSS for last link in a menu

21 June 2008 at 3:52am
In your control loop insert the following (after the link):
<% if Last %><% else %> | <% end_if %>
It's basically saying, if your at the last item, don't insert a pipe. If your not on th elast item, do insert a pipe!
-
Re: Different CSS for last link in a menu

21 June 2008 at 3:54am
Awesome, I just stumbled upon FirstLast while looking for nested sub menu solution.
Thanks!
is there a "comprehensive" list of things I can use on a page?
| 573 Views | ||
|
Page:
1
|
Go to Top |
Currently Online: Webdoc, _Vince
Welcome to our latest member: AlfonsoGrondo


