Topic: How to make empty div 100% width and height?

pawled free asked 2 years ago

How to make the empty div (#this) fills available parent's space?

Michał Duszak staff answered 2 years ago

You can give it CSS properties of width and height equal to 100% by using sizing classes .w-100 and .h-100

Here is the snippet:

However parent of this element in the snippet has 0 height and dynamic width of what .col-lg-6 gives it. If you want it to fill all the available viewport to create somewhat like a background, you can take it out of your .container element and style it properly.

Here is the snippet:

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

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Standard
  • MDB Version: MDB5 3.10.2
  • Device: Any
  • Browser: Any
  • OS: Any
  • Provided sample code: No
  • Provided link: Yes