CSS: Last element on line

前端 未结 6 767
轮回少年
轮回少年 2020-12-15 16:15

I\'ve got an unordered [inline] list of links that wraps across two lines:
\"links



        
6条回答
  •  南方客
    南方客 (楼主)
    2020-12-15 16:59

    I wanted a version that would be visually centered and would also deal with the re-layout bug Randall elegantly handled. This solution also adds a middle dot and space to the first item on each line, which counter-balances the middle dot and space on the end of each line. You might wish to remove this if you left-align your menu.

    I also switched to offset().left in the code because Firefox wasn't working with offset().top.

    The code is below, but here is a link so you can more easily see it working. http://kpao.typepad.com/files/middle-dot-separated-list-v2.html

    
    
    Wildlife Conservation Network programs menu
    
    
    
    
    
    
    
    
    
    

提交回复
热议问题