CSS: new line above first line? -


in horizontal menu (done ul + floated li) li elements shown in next line (below first line) if many fit in current width. example:

first | second | third

fourth | fifth

that´s normal. how can accomplish have next line above first one? example:

fourth | fifth

first | second | third

since doing responsive layout, cannot define order statically should happen automatically in case window width small fit items in 1 row.

thanks in advance, dirk

if browser compatibility isn't absolute requirement, try flex:

ul {     display:flex;     display:-ms-flexbox;     flex-flow: row wrap-reverse;     -ms-flex-flow: row wrap-reverse; } 

the above work in ie10. you'll have -moz- , -webkit- versions, keep changing on me...


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -