Home > Software engineering >  How to eliminate the default left and right white space use by APS.NET layout file?
How to eliminate the default left and right white space use by APS.NET layout file?

Time:11-06

enter image description here

I suspect that is the Bootstrap 5 default setting. I used the inspection to find that there indeed is BS wrapper class, I used the CSS to set all margin and padding of the div.container to 0px, however, the situation become worse, the whole section was shifted to the left and a weird margin occurs at right. Any clue?

div.container{
  padding:0px;
  margin:0px;
}   

enter image description here

CodePudding user response:

This problem is caused by the wrapper that combines the template and existing HTML code. Change container to container-fluid of the wrapper will solve the problem.

in the jQuery file add:

$('.container').addClass('container-fluid').removeClass('container');

  • Related