How can I positioning LI elements to the bottom of UL list

后端 未结 3 799
粉色の甜心
粉色の甜心 2021-01-17 15:16

I have menu items like: Row1 Row2.. RowN and I want them not to be that wide - that\'s why including breaks (with max-width)

I have this HTML:



        
3条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-17 15:57

    Assuming that following is your html

    
    

    You can simply style your CSS as following

    li {
        position:relative;
        float:left;       
    }
    
    li a {
        position:absolute;
        bottom:0;
    }
    

    Above code should work across browsers (I have not tested this across browsers)

提交回复
热议问题