A Previous Sibling Selector

Jim Nielsen set out to style a bunch of links that appeared before hr elements. His solution? The :has() selector.
p:has(+ hr) a:only-child {
}
This, again, proves that the :has() selector is way more than just a parent selector.
A Previous Sibling S…


This content originally appeared on Bram.us and was authored by Bramus!

Jim Nielsen set out to style a bunch of links that appeared before hr elements. His solution? The :has() selector.

p:has(+ hr) a:only-child {
}

This, again, proves that the :has() selector is way more than just a parent selector.

A Previous Sibling Selector →


This content originally appeared on Bram.us and was authored by Bramus!


Print Share Comment Cite Upload Translate Updates
APA

Bramus! | Sciencx (2022-06-28T21:57:31+00:00) A Previous Sibling Selector. Retrieved from https://www.scien.cx/2022/06/28/a-previous-sibling-selector/

MLA
" » A Previous Sibling Selector." Bramus! | Sciencx - Tuesday June 28, 2022, https://www.scien.cx/2022/06/28/a-previous-sibling-selector/
HARVARD
Bramus! | Sciencx Tuesday June 28, 2022 » A Previous Sibling Selector., viewed ,<https://www.scien.cx/2022/06/28/a-previous-sibling-selector/>
VANCOUVER
Bramus! | Sciencx - » A Previous Sibling Selector. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/06/28/a-previous-sibling-selector/
CHICAGO
" » A Previous Sibling Selector." Bramus! | Sciencx - Accessed . https://www.scien.cx/2022/06/28/a-previous-sibling-selector/
IEEE
" » A Previous Sibling Selector." Bramus! | Sciencx [Online]. Available: https://www.scien.cx/2022/06/28/a-previous-sibling-selector/. [Accessed: ]
rf:citation
» A Previous Sibling Selector | Bramus! | Sciencx | https://www.scien.cx/2022/06/28/a-previous-sibling-selector/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.