How do I make an tag the size of it's parent
  • tag for larger clickable region?
  • 前端 未结 7 1391
    我在风中等你
    我在风中等你 2020-12-08 04:11

    I would like to do this so that the clickable region on the tag is size of the LI.

    My html looks like:

  • 7条回答
    •  挽巷
      挽巷 (楼主)
      2020-12-08 05:02

      Try this css

      li{
          border:1px solid black;
          height:40px;
      }
      
      li a{
          border:1px solid red;
          display:block;
          height:100%;
      }
      

    提交回复
    热议问题