Top breadcrumb length

Neil E.

Active member
xenforo88.webp

I have an ad_above_sidebar as you can see. The default top breadcrumb stops at the sidebar (unlike the bottom breadcrumb that goes full width). I would like the top breadcrumb to go full width. What needs to change?
 
It's default behaviour even without your ad there(as seen on XF)

You could edit page_container moving the top breadcrumb out of the "maincontainer",

The maincontainer is the class that has the margin-right.
 
Thanks, I understand, although I'm not sure how good I'll be at trying the move. I suppose if I wanted the bottom breadcrumb to be shorter, I'd need to move it into the "maincontainer".
 
Here you go:

in page_container find:

Code:
                <div class="mainContainer">
                    <div class="mainContent"></xen:if>
                        
                        <xen:include template="ad_above_top_breadcrumb" />
                        
                        <xen:hook name="page_container_breadcrumb_top">
                        <div class="breadBoxTop">
                            <xen:if is="{$topctrl}"><div class="topCtrl">{xen:raw $topctrl}</div></xen:if>
                            <xen:include template="breadcrumb"><xen:set var="$microdata">1</xen:set></xen:include>
                        </div>
                        </xen:hook>

Replace with:

Code:
                <div class="mainContainer">

                        <xen:include template="ad_above_top_breadcrumb" />
                        
                        <xen:hook name="page_container_breadcrumb_top">
                        <div class="breadBoxTop">
                            <xen:if is="{$topctrl}"><div class="topCtrl">{xen:raw $topctrl}</div></xen:if>
                            <xen:include template="breadcrumb"><xen:set var="$microdata">1</xen:set></xen:include>
                        </div>
                        </xen:hook>                     <div class="mainContent"></xen:if>

Last you'll need to adjust the sidebar's height in extra.css:

Code:
.sidebar { margin-top: 40px; }

Might need to adjust the height to your needs
 
Well on further examination, it didn't work so well. Great on the forum index, but then the top breadbox vanishes on all other pages (Firebug didn't show the presence of the top breadbox at all). Russ, do you have any ideas on what might cause this?

Jake, I tried your code but didn't use it. The top breadcrumb was pushed way down the page.

My problems could be a result of a conflict with some other mod I've done. I'll do some testing and see where it leads me.
 
I had a chance to revisit this. I must have done the change wrong before when I tried Jake's code. It's working fine now. I needed only a small top margin to line the sidebar up with my other page content.
 
Back
Top Bottom