MyBB Community Forums

Full Version: Enhanced Account Switcher - Problem with fixed header bar.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Just a small thing, but I've been struggling to fix it for more than a week now.

The header bar on my forum ( http://mu-arae-gamma.com/ ) is set to a fixed position, and from the top of the page it seems to work fine.
[attachment=38798]

But if you click it while scrolled down, the account list scrolls like it's set to absolute.
[attachment=38799]

If I inspect element, I can go in and see that I changed it to fixed in accountswitcher_header_popup, but once you click to drop it down it changes to absolute as part of opening the drop down menu, I assume? I have no idea where this bit of coding is located to change it.
[attachment=38800]
Enhanced Account Switcher uses MyBB's popupMenu() function from jscripts/jquery.plugins.js. This function won't work with a fixed header bar.
You can edit the drop down menu  and e.g. use css for it.

Just as example:

1 . In template "accountswitcher_header_dropdown" replace all with:
&nbsp;<div id="accountswitcher_header"><a href="#">{$lang->aj_profile}</a>
                            <div id="accountswitcher_header_popup">
                                <ul class="trow1">
                                    {$as_header_dropdown}
                                </ul>
	</div>
</div>

2. In your global.css insert:
#accountswitcher_header {
	position: relative;
	float: right;
}

#accountswitcher_header_popup {
	display: none;
	padding: 0 30px 0 15px;
	position:absolute;
	top:0;
}

#accountswitcher_header_popup ul {
	position: absolute;
	left: 0;
	padding-left: 10px;
	padding-right: 20px;
	min-width: 80px;
	margin-top:17px;
	line-height: 200%;
	border-bottom-right-radius: 10px;
	border-bottom-left-radius: 15px;
	white-space: pre-line;	
}

#accountswitcher_header:hover >  #accountswitcher_header_popup {
	display: block;
}
#accountswitcher_header_popup:hover {
	display:block;    
}

3. Adjust the values to your liking.

This should work with your header bar.
It works, thank you so much!!