Hi! I’m building a drop down menu for my project.
The problem is that _ul_ elements with absolute positioning which shows on :hover are not centered under parent _li_ elements as they should be.
I’ve tried to add “left”/”right” to css but with no luck.
I’ll be glad if anyone can help. Thanks.
I’m not sure what you are after.
If you want to center the list items under the parent EVEN THOUGH they are wider…I don’t think you can do that.
So the problem is width, ok. How to make parent element remain width: auto, and not loose “vertical rectangle” form of the items that shows on hover?
If I set width: auto; to them, they are not displayed correctly. – http://codepen.io/anon/pen/tkfJH
You might want to put widths on the ‘a’ links rather than the list items.
I’m still having trouble trying to figure out what it is supposed to look like. Do you have a mock-up image?
You must be logged in to reply to this topic.