Can you have
  • s without them being under a
      or
        ?
  • 前端 未结 5 772
    猫巷女王i
    猫巷女王i 2021-01-12 05:49

    I have a navigation that I am using a list for. I have it in a

      , but that is messing up my UI because it has weird automatic margins. I tried without
    5条回答
    •  抹茶落季
      2021-01-12 06:29

      It's not valid HTML to use

    • outside an ol, ul, or menu element. It's much better to assign a class to the ul element:

      And then use CSS to remove the margin and padding:

      .nav {
          margin: 0;
          padding: 0;
      }
      

    提交回复
    热议问题