1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Top breadcrumb length

Discussion in 'Styling and Customization Questions' started by Neil E., Dec 2, 2012.

  1. Neil E.

    Neil E. Active Member

    xenforo88.jpg

    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?
     
  2. Russ

    Russ Well-Known Member

    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.
     
    Jake Bunce likes this.
  3. Neil E.

    Neil E. Active Member

    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".
     
  4. Russ

    Russ Well-Known Member

    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
     
    Jake Bunce, Taxi and Shelley like this.
  5. Neil E.

    Neil E. Active Member

    Thank you Russ, that worked nicely.
     
    Dinh Thanh likes this.
  6. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

  7. Neil E.

    Neil E. Active Member

    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.
     
  8. Dinh Thanh

    Dinh Thanh Well-Known Member

    Nice, Thank you.
     
  9. Neil E.

    Neil E. Active Member

    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.
     
    Jake Bunce likes this.

Share This Page