Not Solved MyBB Dropdown menu always open
#1
Not Solved
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
Reply
#2
Not Solved
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;">
I don't answer questions about localhost forums or forums without URL, I'm not a seer.  Cool
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)