I have a dynamically generated menu, which resides in resizable container. There are 4 requirements that I have to comply:
- Items must form a horizontally centered menu.
- They have to wrap into n amount of rows and remain aligned.
- It must be an
<ul></ul>list. - It must work with IE7+
Example:
> Item 1 | Item 2 | Item 3 | Item 4 | Item 5 | Item 6 | Item 7 <
Now, when container has shrunk down, itmes must form the following:
> Item 1 | Item 2 | Item 3 | Item 4 <
> | Item 5 | Item 6 | Item 7 <
The < and > signs represent container bounds.
How would I do that in HTML/CSS? Thanks in advance.
EDIT:
I forgot to mention that I have to use <ul> and make it work under IE7+.
HTML:
CSS:
Fiddle: http://jsfiddle.net/eqpGv/2/