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.

[BUG]If first element inside .nav-sidebar is a li.nav-header the padding is different to other li.nav-header

See original GitHub issue

Describe the bug If first element inside .nav-sidebar is a li.nav-header the padding is different to other li.nav-header. I often like to use a .nav-header as the first item.

To Reproduce Steps to reproduce the behavior:

  1. Add <li class="nav-header">TEST</li> as the first item in the .nav-sidebar

Expected behavior The padding to the left/right should be of the li.nav-header should be 1rem as per all subsequent headers

Screenshots nav-header

Environment (please complete the following information):

  • AdminLTE Version: 3.1.0-rc
  • Operating System: Windows 10
  • Browser (Version): Chrome (latest)

Additional context The problem seems to be in _main-sidebar.scss

.nav-header {
    font-size: .9rem;
    padding: $nav-link-padding-y;

    &:not(:first-of-type) {
      padding: 1.7rem 1rem .5rem;
    }
  }

So the .nav-header only gets the 1rem for left and right if it is not the first-of-type.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:10

github_iconTop GitHub Comments

2reactions
pauldbentleycommented, Feb 17, 2021

Thanks @REJack that fixes the issue.

0reactions
REJackcommented, Feb 17, 2021

Fixed with 378a39ea125c216004ac4127f64260f21d3a1932.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Padding in the navbar while shifting the element
Your issue is because your background-color is on the li and not on a.signed but you are moving your a.signed with left: 300px; ......
Read more >
How to create an awesome navigation bar with HTML & CSS
A tutorial that takes a look at how to create a nice looking nav bar with a cool little hover effect for the...
Read more >
Space Between Nav Bar and Header - Spiceworks Community
I have a space between my header and nav bar. Any suggestions? @charset "utf-8"; /* CSS Document */ #wrapper { height: 895px; width:...
Read more >
HTML slide in navbar wrong position - Anycodings.com
HTML slide in navbar wrong position I have a problem. I am trying to create a anycodings_css responsive navbar with ...
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