CSS: Fixed with horizontal menu, with variable width tabs, using ul

前端 未结 5 527
春和景丽
春和景丽 2020-12-15 09:40

I have a horizontal menu. The markup looks like this:

  • Item 1
  • Longer Item 2
5条回答
  •  庸人自扰
    2020-12-15 10:45

    I reckon boldewyn's suggestion should work. I would use this approach for modern browsers and then use conditional comments to feed the following to ie6/7, so that the nav looks ok there , though won't span the 100% width.

    ul {
      width: 100%;
    }
    li {
      float:left; // or display:inline-block;
    }
    

提交回复
热议问题