Wednesday 29 May 2019

css selectors - CSS Select first element found with attribute

I've tried :first-child :nth-of-type and a few other ways of selecting the first and last element found not based on the childs parent.



With CSS I want to select the first and last element found with a specific attribute regardless.




















How would I select the first and last "data-select" element found regardless of its parent container?

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...