CSS vertical menu - how do i get *some* child items to align to right edge of parent?? |
[eluser]spheroid[/eluser]
I have a purely css menu that drops down child menus vertically. The parent menu is aligned to the right of the page. The child menus that drop down are left-aligned with their parent menu. Is there a way to easily adjust some menus (like the rightmost ones) to have their child menus align with the right of their parent? Example: Code: MENU 1 MENU 2 MENU 3 MENU 4 Site is at: http://www.realadvice.com
[eluser]GSV Sleeper Service[/eluser]
off the top of my head, no guarantee it'll work Code: //give your last menu header a class of 'last'
[eluser]nstokes[/eluser]
You can fix it by adding two things: Code: #primary-nav li, #primary-nav li.menuparent { and Code: #primary-nav ul { That should align each submenu to the right side of the parent.
[eluser]spheroid[/eluser]
@nstokes: Thanks a million, this worked! I ended up adding a #primary-nav-right as well to the css class file so I could declare a ul as id="primary-nav" or id="primary-nav-right".
|
Welcome Guest, Not a member yet? Register Sign In |