John M
John M

Reputation: 14688

ASP .NET MVC 5 - Decrease the left hand margin

I have created a new ASP .NET MVC application in VS2015 using the default template. My index views are used the default shared _Layout file.

The issue is that the views all have excessive left hand margins with data being pushed off screen on the right.

How can I modify the CSS (bootstrap?) to reduce the left hand margin?

enter image description here

Update1:

Per the hint from Aravind.

I opened boostrap.css and then modified the css property .pull-left and commented out the float code:

.pull-left {
  /*float: left !important;*/
}

Update2

Per another hint from @Steven B

Went into _Layout.cshtml and edited to show:

<div class="container-fluid body-content">
        @RenderBody()
        <hr />
        <footer>
            <p>&copy; @DateTime.Now.Year - Penske Logistics</p>
        </footer>
    </div>

Upvotes: 0

Views: 3511

Answers (2)

nessiah
nessiah

Reputation: 21

You could also try renaming your div to something outside of a bootstrap feature. Instead of using container, use main.

<div class="main">Application Name</div>

This should give you the full width of the page as well

Upvotes: 0

Aravind
Aravind

Reputation: 41581

Use pull-left class as

<div class="pull-left"> Application Name </div>

Upvotes: 2

Related Questions