XF 2.1 How to keep radius setting for Tab Menu when scrolling ?

Nicolas FR

Well-known member
Hello,

As title...
How to do that ? When you scrolling the radius settings is off and the selected tab is all square !

Thanks ! :)
 
Hello,
Add this to your extra.less template
Less:
.p-navSticky.is-sticky .p-nav .p-nav-list .p-navEl.is-selected, .p-navSticky.is-sticky .p-nav .p-account {
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}
 
Yeah, you already add some CSS in your extra.less template concerning the navigation area, right ?
To remove sub-navigation in particular...

The code i provided you works with original style.
It should work...

Capture d'écran 2023-03-13 153637.webp
 
My bad, my code theoretically keeps the radius when scrolling and the navigation bar is sticky. I didn't notice you were talking about the problem when the tab is open... But it's weird because originally the open tabs keep their radius, you can test here... So I guess there is some code somewhere that causes this.

You can try this:
Less:
.p-nav-list .p-navEl.is-menuOpen {
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}
 
By the way @Nicolas FR I noticed that on your forum, when you hover the menu there is no radius on the corners :) not sure if it is on purpose.
Yes, that's designed like this, my navigation bar is not customized at all.

I noticed that when I move the mouse between the menu, during few milliseconds the radius disapear.
You can try this if you want
Less:
.p-nav-list .p-navEl-link.p-navEl-link--splitMenu {
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}

.p-nav-list .p-navEl {
    border-top-left-radius: 4px;
}
 
That doesn't work either.
I have reduce the issue by changing the background color when hovering. The white makes the problem quite visible, with a blue-ish color it is a bit less visible.

Thanks anyway for your help. :)
 
Top Bottom