Reputation: 1126
Could you please take a look at the harvard medical school website here http://hms.harvard.edu/
The last item of the navigation drop down menu has the sub menu not being displayed out of its fixed div. That is: the sub menu position of the last item is adjusted so that it won't float out.
How to do it in pure css?
Hope you understand what I am talking about. Thank you
Upvotes: 0
Views: 826
Reputation: 47667
On that particular website it's done by manual positioning of the last element.
All the other submenus have { position: absolute; left: 0; }
but the very last one left: -91px
. You can attach a class to the last menu item (or use :last-child
but that won't work in older IE-s) and move it to the left to fit into the main content box.
Upvotes: 1