anchor tag inside ul before li

后端 未结 4 758
别跟我提以往
别跟我提以往 2021-01-11 15:51

I am adding an anchor tag inside ul and inside anchor tag I am adding li. But when I tested this on html validator it gives me error. Is there a proper way to achieve this?<

4条回答
  •  难免孤独
    2021-01-11 16:32

    This question is very old but I want to add something to it:

    This CSS should also force the anchor element be the same width and height of the parent li which would achieve the desired effect as well.

    ul li a {
        width:inherit;
        height:inherit;
    }
    

提交回复
热议问题