XF 2.1 Reducing widith of header and secondary navbar

Live Free

Active member
I'm working on a custom style. The header and secondary navbar extend to the full width, but I'd like to limit them to the inner width displayed. I've spent a while exploring inspect > element and customizing the CSS with no dice. Can anyone point me in the right direction? See attachment.

Screen Shot 2021-01-25 at 11.02.22 PM.webp
 
Yes, I think so. I managed to get the header section, but the bar that says "new posts" and "search forums" still extends too far left and right.

Screen Shot 2021-01-30 at 2.32.19 AM.png

It looks like the css class is p-sectionLinks

It's Sub-Nav Row in Style Properties
 
Last edited:
All you need to do is add this to extra.less:
CSS:
@media (min-width:1200px) {
    .p-pageWrapper {
        width: 1200px;
        margin: auto;
    }
}

You may want to undo all changes you did to get what you got and then implement that one change only as I don't know what you did to achieve that.

I also made the navigation also stick by using this option:
ACP->Appearance->Styles->X->Header and navigation and set Sticky navigation element to Primary navigation row only.

And I like the add on by @BassMan to move the logo into the navbar on scroll found here:
 
Back
Top Bottom