Topic: Buttons larger than viewport

Leitner free asked 4 years ago


I have a problem with buttons and offset in a container-fluid. My buttons are larger than the viewport. See here:

When I try this code without MDB (plain Bootstrap only) it works. See:

Thanks for your help :)

Marta Wierzbicka staff answered 4 years ago


try code from here: The problem is that ".btn.btn-block" class has settings "margin: inherit" and when you add the ".offset-2" class to the ".col-5" class, a button take this margin so you have something like two margins. To stop this behavior, I've added the ".m-0" class to the button which has the ".offset-2" wrapper.



Leitner free commented 4 years ago

Thanks Marta, it works :)

Regards Christian

Marta Wierzbicka staff answered 4 years ago


You're welcome.

Please insert min. 20 characters.


Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.



Specification of the issue

  • User: Free
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.5.10
  • Device: PC, Android
  • Browser: Chrome, Edge
  • OS: Windows 10, Android 8
  • Provided sample code: No
  • Provided link: Yes