This minor misplacement is easily fixed with a few CSS overrides, as demonstrated here. Here is a comparison of the results. The menu to the left is the menu demo before our CSS fixes, and the menu to the right is the resulting menu.
The fix itself is really straightforward. The
.ui-menu .ui-icon
selector fixes the position of the icons to the left of the item text. We're just slightly increasing the top
property, pushing the icon downward. But then we have this selector — .ui-menu .ui-menu-icon
. That's used to fix the sub-menu icon positioned to the right of the text. Since this icon is positioned statically, we have to use the margin-top
property to push the icon down.The changes are hardly noticeable, but, they alignment bothered me. So, this is my fix should the alignment bother anyone else.
No comments :
Post a Comment