3

I'm trying to figure out how to get my Angular 2 + Material Design app to be completely full width. I know M.D. isn't finished but it looks like the only thing I can do it just to manually put body's margins at 0 which does not seem like a good answer.

I tried going through the wiki for the flex-layout but I guess I must be missing something.

halfer
  • 19,824
  • 17
  • 99
  • 186
av0000
  • 1,917
  • 6
  • 31
  • 51
  • Material design isn't concerned with your page's outer layout. Neither is Angular. This is a simple CSS question, and it seems you already know the answer. – isherwood Mar 14 '17 at 19:22
  • Possible duplicate of [How to remove margin space around body or clear default css styles](http://stackoverflow.com/questions/9547291/how-to-remove-margin-space-around-body-or-clear-default-css-styles) – zurfyx Mar 14 '17 at 19:37
  • 1
    [flex-layout](https://github.com/angular/flex-layout) is what handles this now. – crthompson Apr 19 '17 at 20:32

1 Answers1

5

As @isherwood said it only requires a few line of css. @angular/material2 has nothing to do with that :)

body, html{
  height: 100%
}
body{
  margin: 0;
  background-color: rgba(255,0,0,.5);
}
Ploppy
  • 14,810
  • 6
  • 41
  • 58