-3

I started a new project with Asp.Net MVC and wondered how to remove/lower this margin. I added 2 pictures in order to see it.

enter image description here

enter image description here

I am pretty new to Asp.Net. Does somebody know how to lower the space?

Tom el Safadi
  • 6,164
  • 5
  • 49
  • 102
  • If you use the inspect element tool from the browser dev tools you'll be able to see what's generating that sapce. Then you can target that particular element accordingly. Also you have `hr` tag which is usually used to separate content, you could remove it and see what happens – Izzy Jan 26 '16 at 13:28
  • You seem to be new to `HTML` rather than `ASP.NET`. You can use w3shools website to learn these –  Jan 26 '16 at 14:14

1 Answers1

3

The Visual Studio ASP.NET default project template used Bootstrap. Override the width or remove the container class from your body-content.

Bootstrap use this trick to center the element https://stackoverflow.com/a/114549/451668

.container {
    /* first set a width that is smaller then the view */
    width: /* ...px */;
}

.container {
    /* and then set the left and right margin to auto to dynamically calc the same space left and right from the container */
    margin-right: auto;
    margin-left: auto;
}

Future reading: http://getbootstrap.com/css/#overview-container

Community
  • 1
  • 1
Markus
  • 3,871
  • 3
  • 23
  • 26