MyBB Community Forums

Full Version: MyBB Dropdown menu always open
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi there,
I've got a problem with my dropdown menu - it's always open when i open the website.

You can close it, but i'd want it to be closed as a start when you open the website
Current code for the menu:

<a class="d-flex align-items-center dropdown-activate">
			
				<img src="{$mybb->user['avatar']}" width="25" height="25" style="border-radius: 2px; margin-right: .5rem" id="user_avatar" onerror="this.src='images/default_avatar.png';">
			
			{$mybb->user['username']} &nbsp; <i class="fas fa-angle-down"></i>
		</a>
	</li>
	<div class="dropdown">
         		<div class="dropdown-content">
                        <div class="arrow-up"></div>
			<div class="tborder">
                           <divclass=display:block !important;">
				<a href="member.php?action=profile">
					<div class="trow1 grey"><i class="fa fa-user"></i>&nbsp; Profile</div>
				</a>
				<a href="search.php?action=finduser&amp;uid={$mybb->user['uid']}">
					<div class="trow2 grey"><i class="fas fa-comments"></i>&nbsp; My Posts</div>
				</a>
				<a href="search.php?action=finduserthreads&amp;uid={$mybb->user['uid']}">
					<div class="trow1 grey"><i class="fas fa-book"></i>&nbsp; My Threads</div>
				</a>
				{$usercplink}
				{$modcplink}
				{$admincplink}
				<a href="{$mybb->settings['bburl']}/member.php?action=logout&amp;logoutkey={$mybb->user['logoutkey']}">
					<div class="trow1 grey"><i class="fas fa-sign-out-alt"></i>&nbsp; Logout</div>


Any help is appreciated

Anyone? Smile
Hi,

code without CSS part or even the JS part it's useless.

If you have an URL it'll be better.

But this line it's bad, really bad:
<divclass=display:block !important;">

Try to change it to:
<div style="display:block !important;">