Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
get value of sibling above - Kevin Powell - Community
KP-C
Kevin Powell - Community
•
2y ago
•
28 replies
snxxwyy
get value of sibling above
Hey
, if i have a structure like so
:
<
p
class
=
"a"
>...</
p
>
<
p
class
=
"b"
>...</
p
>
<
p
class
=
"a"
>...</
p
>
<
p
class
=
"b"
>...</
p
>
.a
{
color
:
blue
;
}
.a
{
color
:
blue
;
}
in terms of the p tag with the class of
b
b
, would it be possible to get the value from the
color
color
property from the sibling above it so i can utilize that within the styles of
b
b
? Thanks in advance
.
Kevin Powell - Community
Join
A friendly place for developers to meet other devs, ask questions, get help, and just have a good time 🙂.
36,263
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
Opposite of adjacent sibling combinator?
KP-C
Kevin Powell - Community / front-end
4y ago
grow image to size of sibling
KP-C
Kevin Powell - Community / front-end
3y ago
Previous Sibling Selector
KP-C
Kevin Powell - Community / front-end
4y ago