Make whole
  • as link with proper HTML
  • 前端 未结 9 2129
    忘掉有多难
    忘掉有多难 2021-02-02 13:23

    I know this has been up a lot of times before, but I couldn\'t find any solution in my specific case.

    I\'ve got a navigation bar and I want the whole

  • 9条回答
    •  一个人的身影
      2021-02-02 13:52

      Just use "display block" for link.

      ul {
        display: block;
        list-style-type: none;
      }
      
      li {
        display: inline-block; /* or block with float left */
        /* margin HERE! */
      }
      
      li a {
        display: block;
        /* padding and border HERE! */
      }
      

      Here's the example http://jsfiddle.net/TWFwA/ :)

    提交回复
    热议问题