I have a requirement where I need to display the last two li elements from an ul list on a new line if the screen width is less than 625px. The code snippet below achieves this functionality:
- ...
- ...
- ...
- ...
However, this code fails validation on https://validator.w3.org/nu due to the nesting of p within ul element. Can anyone suggest a simple, effective, and valid solution to achieve the same desired outcome?