quarks
quarks

Reputation: 35346

How to force "container-fluid" to max out height or stretch when browser is resized

With Bootstrap there is a CSS style container-fluid which we use in our app. The problem is, when the app loads I can see that the div which this CSS style is applied gets this:

element.style {
   height: 322px;
}

However I tried to use Javascript to set the CSS height of container-fluid on app load, the height gets that size, which is actually the initial height of the browser. So the issue is that when I resize the browser there gets a white space that the background of the div which have this container-fluid property.

Upvotes: 0

Views: 1112

Answers (1)

Mohd Imran
Mohd Imran

Reputation: 90

Use !important with that class styling and javascript won't take over this property.

For example:

#main {    
  height: 100% !important; 
}

Upvotes: 1

Related Questions