question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

User account menu fly out the screen in small screen

See original GitHub issue

dear @almasaeed2010 I used your admin LTE as a foundation building my web apps school project I found an issue that the user account menu fly outside the screen when screen is resized

bank sampah 3

my code

 <!-- Navbar Right Menu -->
        <div class="navbar-custom-menu">
          <ul class="nav navbar-nav">
            
          <!-- User Account Menu -->
            <li class="dropdown user user-menu">
              <!-- Menu Toggle Button -->
              <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                <!-- The user image in the navbar-->
                <img src="<?php echo base_url('assets/avatar/avatar_default.png');?>" class="user-image" alt="User Image">
                <!-- hidden-xs hides the username on small devices so only the image appears. -->
                <span class="hidden-xs"><?php echo $this->session->userdata('fullname');?></span>
              </a>
              <ul class="dropdown-menu">
                <!-- The user image in the menu -->
                <li class="user-header">
                  <img src="<?php echo base_url('assets/avatar/avatar_default.png');?>" class="img-circle" alt="User Image">

                  <p>
                    <small><?php echo $this->session->userdata('fullname');?></small>
                  </p>
                </li>
                <!-- Menu Body -->
               
                <!-- Menu Footer-->
                <li class="user-footer">
                  <div class="pull-right">
                    <a href="<?php echo base_url(); ?>Auth/logout" class="btn btn-default btn-flat">Sign out</a>
                  </div>
                </li>
              </ul>
            </li>
          </ul>
        </div>
        <!-- /.navbar-custom-menu -->
      </div>

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:14 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
almasaeed2010commented, Jan 17, 2017

Thanks for sharing the solution with us!

0reactions
eruvierdacommented, Jan 17, 2017

Solved : when I work with my pal, it seems we wrote down this code in the header that affect user menu dropdown setting. just need to delete it. Thanks for all your concern @almasaeed2010 @REJack

    $(document).ready(function() {
    $('.navbar a.dropdown-toggle').on('click', function(e) {
        var $el = $(this);
        var $parent = $(this).offsetParent(".dropdown-menu");
        $(this).parent("li").toggleClass('open');

        if(!$parent.parent().hasClass('nav')) {
            $el.next().css({"top": $el[0].offsetTop, "left": $parent.outerWidth() - 4});
        }

        $('.nav li.open').not($(this).parents("li")).removeClass("open");

        return false;
    });
});

  </script>```


Read more comments on GitHub >

github_iconTop Results From Across the Web

PowerApps flyout menus, floating buttons, and X Y Controls
In this video, you will learn how to control where items appear on the screen. There are flyout menus and buttons docked to...
Read more >
Extra monitor, menus appearing on wrong screen
Right-click desktop, choose Resolution; Click monitor #2 and choose "make primary", click Apply; (if necessary), unlock your taskbar and drag it ...
Read more >
Convert a Menu to a Dropdown for Small Screens | CSS-Tricks
Create a menu that, on smaller screens, changes into a dropdown menu. A dropdown takes up much less screen real estate and can...
Read more >
Reduce screen motion on your iPhone, iPad, or iPod touch
If you have sensitivity to motion effects or screen movement on your iPhone, iPad, or iPod touch, you can use Reduce Motion to...
Read more >
How To Create a Full screen Overlay Navigation - W3Schools
Use any element to open/show the overlay navigation menu --> ... 30px top margin to avoid conflict with the close button on smaller...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found