MyBB Community Forums

Full Version: Stop heading for following scroll.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

On my forums the header stays at the top of your screen as you scroll down, I'm trying to remove that ability so that it just stays in place. I've looked in the header but can't seem to find the code, this is the header code:

<span class="float_left"> 
    <a href="{$mybb->settings['bburl']}/member.php?action=register" class="register bradius">{$lang->welcome_register}</a>
</span>

    <div class="modal login-modal" id="quick_login" style="display: none;">
        <form method="post" action="{$mybb->settings['bburl']}/member.php">
            <input name="action" type="hidden" value="do_login" />
            <input name="url" type="hidden" value="" />
            <input name="quick_login" type="hidden" value="1" />    
        <table width="100%" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" border="0" class="tborder">
            <tr><td class="thead signin" colspan="3">{$lang->login}</td></tr>
            <tr><td></td></tr>
            <tr>
                <td class="trow1 white-bg nopd-tb no_bottom_border">
                    <input name="quick_username" id="quick_login_username" type="text" placeholder="Username" class="textbox initial_focus lgn" style="width: 272px; font-size: 14px;" />
                </td>
            </tr>
            <tr><td></td></tr>
            <tr>
                <td class="trow1 white-bg nopd-tb no_bottom_border">
                    <input name="quick_password" id="quick_login_password" type="password" placeholder="Password" class="textbox lgn" style="width: 272px; font-size: 14px;" />
                </td>
            </tr>
            <tr>
                <td class="trow1 remember_me white-bg">
                    <div class="float_left">
                        <input name="quick_remember" id="quick_login_remember" type="checkbox" value="yes" class="checkbox" checked="checked" />
                        <label for="quick_login_remember" class="rmb-login">{$lang->remember_me}</label><br />
                    </div>
                    <div class="float_right" style="margin-top: 2px;">
                        <a href="{$mybb->settings['bburl']}/member.php?action=lostpw" class="lost_password" style="font-size: 14px;">{$lang->lost_password}</a>
                    </div>
                </td>
            </tr>
            <tr>
                <td class="trow2 white-bg" colspan="2">
                    <input name="submit" type="submit" class="button lgn-btn float_right" value="{$lang->login}" />
                </td>
            </tr>
        </table>
        </form>
    </div>

    <script type="text/javascript">
        $("#quick_login input[name='url']").val($(location).attr('href'));
    </script>

    <ul class="menu top_links">
        <li><a href="{$mybb->asset_url}/portal.php">{$lang->toplinks_portal}</a></li>
        <li><a href="{$mybb->settings['homeurl']}">Forums</a></li>
        <li><a href="{$mybb->asset_url}/search.php">{$lang->toplinks_search}</a></li>
        <li><a href="{$mybb->asset_url}/memberlist.php">{$lang->toplinks_memberlist}</a></li>
        <li><a href="{$mybb->asset_url}/calendar.php">{$lang->toplinks_calendar}</a></li>
        <li><a href="{$mybb->asset_url}/misc.php?action=help" class="help">{$lang->toplinks_help}</a></li>
    </ul>

    </div>
</div>

<div class="lower">
    <a class="buttons float_right"></a>
    <a class="clickedbuttons float_right"></a>
    <div class="wrapper">
        <ul class="menu user_links">
            <li><a href="{$mybb->settings['bburl']}/search.php?action=getnew">{$lang->welcome_newposts}</a></li>
            <li><a href="{$mybb->settings['bburl']}/search.php?action=getdaily">{$lang->welcome_todaysposts}</a></li>
        </ul>        
    </div>
    <br class="clear" />
</div>

How would I go about making it stay in place?
what is your forum url & which theme you are using ?
^ in the global.css stylesheet of the theme find property rules used for .navbar and remove position: fixed;
save the stylesheet & hard refresh your browser on forum index page. then check if it helps
I can't find anything in the global.css to do with the .nabar that has position: fixed;

The only thing that changes some of it is:

#sticky-container {
	position: relative;
}

But if I change/remove it it messes up.
If I remove it, it gets stuck to the top of the web browser and still follows.
^ provide forum url so that someone can check it ..
you can try adding below style properties to bottom of global.css stylesheet of the theme

#panel {position: relative !important;}
  #fake-panel {height: 0px !important;}

note: edit the stylesheet in forum admin panel (through themes section) AND in advanced edit mode (tab)

remember hard refreshing your browser on forum index after saving changes to the stylesheet
Haha, thank you so much it worked!
Really, thanks so much for the help!