Thursday, 17 January 2019

html - Changing elements CSS properties based on child element








This is my markup:





  1. 1

  2. 2






And I want to change the background-position property of the li element that has a span child with the class current. In this case, the second list item.



I do consider myself proficient with CSS, but I really cannot think of how to do that. Maybe there isn't a way, or I'm just having a brain fart.



Thanks!

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...