XF 2.3 How can I position this shadow element behind this node?

FaeWhisperer

Member
Licensed customer
Hi,

I've been on Xenforo since 2022, and I've used this code:

CSS:
.template-forum_list .block-container .node::before {
  
    /* Position the pseudo shadow element. */
    content: ' ';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: -1;
  
    /* Create the box shadow at expanded size. */
    box-shadow: 0 0 8px @xf-paletteColor1, inset 0 0 10px @xf-contentAltBg;
    border-radius: 5px;
    background: @xf-contentAltBg;

to make this happen whenever I hover over a node.
Screenshot 2026-05-18 144806.webp

I've been wanting to do a gradient version of this for a while yet I know box-shadows only come in one solid color. I think.

So, I got to this point:
CSS:
.template-forum_list .block-container .node::before {
  
    /* Position the pseudo shadow element. */
    content: ' ';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: -1;
  
    /* Create the box shadow at expanded size. */
    border-radius: 5px;
    background: linear-gradient(135deg, blue,cyan,purple,pink);
    filter: blur(5px);

and got this:
Screenshot 2026-05-18 144620.webp

whenever I hover over the same node.

I just... want this behind the node element, and idk how. I want it to look like the first image, but have been scratching my head (and searching old forums) for insight.

Also I'm pretty sure this code is super dated so... any help is appreciated~!
 
Back
Top Bottom