li:last-child doesn't seem to work in IE8

前端 未结 7 1963
别那么骄傲
别那么骄傲 2021-01-20 05:54

Below is my html structure

  • Home
  • About
  • Feedb
相关标签:
7条回答
  • 2021-01-20 06:53

    The other answers are correct that IE8 doesn't support last-child. However, to solve your particular problem, you could either a) manually add a class to the last <li> or b) as this is a menu, and these will presumably have links inside them, target the last link with an attribute selector, which does work in IE8. Something like

    .footermenu a[href="contact.html"] { ... }
    
    0 讨论(0)
提交回复
热议问题