title: unable to get rid of a x-overflow (scrollbar is hidden but I can still scroll to the right)
body: <p>I am busy with a project where I am using angular-flex-layout.  As far as I understood a flex container should wrap to the next line if the fxLayoutWrap property is applied to a container.  For some reason I have a very small x-overflow.  it used to be bigger and then I removed some fxLayoutGaps I had on two fxLayout  row containers which made it much better.  I have no idea what the cause of this could be as I applied the fxLayoutWrap property to the parent (first row of dashboard component) row container.  Any idea what i'm doing wrong?</p>
  
  <p><strong>Picture of the pageafter scrolling to the right</strong></p>
  
  <p><a href="https://imgur.com/a/Ga4UR" rel="noreferrer">https://imgur.com/a/Ga4UR</a></p>
  
  <p><strong>And a picture before scrolling to the right:</strong></p>
  
  <p><a href="https://imgur.com/CWyWO4T" rel="noreferrer">https://imgur.com/CWyWO4T</a></p>
  
  <p><strong>my code:</strong></p>
  
  <p>my home component's html:</p>
  
  <pre><code>&lt;mat-sidenav-container position="start" class="custom-sidenav-container"&gt;
      &lt;mat-sidenav #sidenav mode="side" opened="true"&gt;
          Navigation
          &lt;ul class="sn-list"&gt;
              &lt;li&gt;                    
                  &lt;mat-icon class="sn-item"&gt;
                      &lt;i class="material-icons"&gt;dashboard&lt;/i&gt;
                  &lt;/mat-icon&gt;
                  &lt;a class="sn-item" href="#"&gt;Dashboard&lt;/a&gt;       
              &lt;/li&gt;
              &lt;li&gt;
  
                  &lt;mat-icon class="sn-item"&gt;
                      &lt;i class="material-icons"&gt;archive&lt;/i&gt;
                  &lt;/mat-icon&gt;             
                  &lt;span class="sn-item" [matMenuTriggerFor]="stockSystemMenu"&gt;Stok System&lt;/span&gt;
  
                  &lt;mat-menu [overlapTrigger]="false" #stockSystemMenu="matMenu"&gt;
                      &lt;button mat-menu-item&gt;
                          &lt;mat-icon class="sn-item"&gt;
                              &lt;i class="material-icons"&gt;chevron_right&lt;/i&gt;
                          &lt;/mat-icon&gt;
                          &lt;span class="sn-item"&gt;Service 1&lt;/span&gt;
                      &lt;/button&gt;
                      &lt;button mat-menu-item&gt;
                          &lt;mat-icon class="sn-item"&gt;
                              &lt;i class="material-icons"&gt;chevron_right&lt;/i&gt;
                          &lt;/mat-icon&gt;
                          &lt;span class="sn-item"&gt;Service 2&lt;/span&gt;
                      &lt;/button&gt;
                      &lt;button mat-menu-item&gt;
                          &lt;mat-icon class="sn-item"&gt;
                              &lt;i class="material-icons"&gt;chevron_right&lt;/i&gt;
                          &lt;/mat-icon&gt;
                          &lt;span class="sn-item"&gt;Service 3&lt;/span&gt;
                      &lt;/button&gt;
                  &lt;/mat-menu&gt;
              &lt;/li&gt;           
              &lt;li&gt;
                  &lt;mat-icon class="sn-item"&gt;
                      &lt;i class="material-icons"&gt;shopping_cart&lt;/i&gt;
                  &lt;/mat-icon&gt;
                  &lt;span class="sn-item" [matMenuTriggerFor]="salesMenu"&gt;Sales / Purchases&lt;/span&gt;
                  &lt;mat-menu [overlapTrigger]="false" #salesMenu="matMenu"&gt;
                      &lt;button mat-menu-item&gt;
                          &lt;mat-icon class="sn-item"&gt;
                              &lt;i class="material-icons"&gt;chevron_right&lt;/i&gt;
                          &lt;/mat-icon&gt;
                          &lt;span class="sn-item"&gt;Service 1&lt;/span&gt;
                      &lt;/button&gt;
                      &lt;button mat-menu-item&gt;
                          &lt;mat-icon class="sn-item"&gt;
                              &lt;i class="material-icons"&gt;chevron_right&lt;/i&gt;
                          &lt;/mat-icon&gt;
                          &lt;span class="sn-item"&gt;Service 2&lt;/span&gt;
                      &lt;/button&gt;
                      &lt;button mat-menu-item&gt;
                          &lt;mat-icon class="sn-item"&gt;
                              &lt;i class="material-icons"&gt;chevron_right&lt;/i&gt;
                          &lt;/mat-icon&gt;
                          &lt;span class="sn-item"&gt;Service 3&lt;/span&gt;
                      &lt;/button&gt;
                  &lt;/mat-menu&gt;         
              &lt;/li&gt;       &lt;/ul&gt;
      &lt;/mat-sidenav&gt;
      &lt;div class="sn-content"&gt;
      &lt;!--&lt;button mat-icon-button (click)="sidenav.toggle()"&gt;--&gt;
          &lt;!--&lt;mat-icon aria-label="menu"&gt;--&gt;
              &lt;!--&lt;i class="material-icons"&gt;restaurant_menu&lt;/i&gt;--&gt;
          &lt;!--&lt;/mat-icon&gt;--&gt;
      &lt;!--&lt;/button&gt;--&gt;
      &lt;/div&gt;
  
  
  
      &lt;mat-toolbar class="toolbar" color="primary"&gt;
          &lt;button mat-icon-button (click)="toggleSidenav()"&gt;
              &lt;mat-icon aria-label="menu"&gt;
                  &lt;i class="material-icons"&gt;restaurant_menu&lt;/i&gt;
              &lt;/mat-icon&gt;
          &lt;/button&gt;
          &lt;span&gt;POC Toolbar&lt;/span&gt;            
          &lt;span class="fill-remaining-space"&gt;&lt;/span&gt;
          &lt;div class="rhs"&gt;
              &lt;mat-icon class="rhs-icon fa fa-home fa-lg"&gt;&lt;/mat-icon&gt;
              &lt;span class="rhs-item"&gt;Home&lt;/span&gt;  
  
              &lt;mat-icon class="rhs-icon fa fa-sign-out fa-lg" aria-hidden="true"&gt;&lt;/mat-icon&gt;
              &lt;span class="rhs-item"&gt;Logout&lt;/span&gt;
  
              &lt;mat-icon class="rhs-icon fa fa-key fa-lg"&gt;&lt;/mat-icon&gt;
              &lt;span class="rhs-item"&gt;Password&lt;/span&gt;
  
              &lt;mat-icon class="rhs-icon fa fa-sitemap fa-lg"&gt;&lt;/mat-icon&gt;
              &lt;span class="rhs-item"&gt;Site map&lt;/span&gt;          
          &lt;/div&gt;  
      &lt;/mat-toolbar&gt;  
  
  &lt;router-outlet&gt;&lt;/router-outlet&gt;
  &lt;/mat-sidenav-container&gt;
  </code></pre>
  
  <p><strong>my dashboard component's html (This is the default route of the router-outlet in home component)</strong></p>
  
  <pre><code>&lt;div fxLayout="row"  fxLayoutAlign="start start" fxLayoutWrap&gt;
      &lt;br /&gt;&lt;br /&gt;    
  
      &lt;div fxFlex&gt;
          &lt;div fxLayout="column" fxLayoutGap="20px"&gt;
              &lt;div fxFlex&gt;
                  &lt;h1&gt;Dashboard&lt;/h1&gt;
              &lt;/div&gt;
              &lt;div fxFlex&gt;
                  &lt;p&gt;Lorem ipsum dolor sit amet, eum iuvaret delicata at. Eu postea commodo persius mei. Id est semper constituto, ignota aperiri adversarium ne vix. Id est impetus suscipit, nulla meliore epicuri id eos. &lt;br /&gt; Ad pro modo albucius atomorum. At mel ullum libris debitis, in vero apeirian mediocrem mei.&lt;/p&gt;
              &lt;/div&gt;
              &lt;div fxFlex="80%"&gt;
                  &lt;p&gt;Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras mattis consectetur purus sit amet fermentum. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh.&lt;/p&gt;
              &lt;/div&gt;
              &lt;div fxFlex="80%"&gt;
                  &lt;h2&gt;Sample Angular/Flex Column Layout&lt;/h2&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div fxLayout fxLayoutGap="15px"&gt;
              &lt;div fxFlex="26%"&gt;              
                      &lt;h3&gt;Notes&lt;/h3&gt;
                      &lt;ul&gt;
                          &lt;li&gt;we're using responsive css &amp;amp; Angular(Angular-material &amp;amp; Angular/flex) This allows us to show (or hide) things like the left menu and the number of columns displayed by dataTables.&lt;/li&gt;
                          &lt;li&gt;The amount of "Custom" css we've used is actually very little, prefering rather to make use of the framework's built in features.&lt;/li&gt;
                          &lt;li&gt;Angular reactive forms and validators should probably replace the generic php form.&lt;/li&gt;
                          &lt;li&gt;No server side php is used.&lt;/li&gt;
                      &lt;/ul&gt;
              &lt;/div&gt;
              &lt;div fxFlex="26%"&gt;
                  &lt;h3&gt;Example views&lt;/h3&gt;
                  &lt;ul&gt;
                      &lt;li&gt;&lt;a href="#"&gt;Login Screen&lt;/a&gt;&lt;/li&gt;
                      &lt;li&gt;&lt;a href="#"&gt;Home Page&lt;/a&gt; &amp;raquo; Ledger system &amp;raquo; Sales ledger &amp;raquo; Customer master files&lt;/li&gt;
                      &lt;li&gt;&lt;a href="#"&gt;Customer Master Search&lt;/a&gt;&lt;/li&gt;
                      &lt;li&gt;&lt;a href="#"&gt;Customer Master List&lt;/a&gt;&lt;/li&gt;
                      &lt;li&gt;&lt;a href="#"&gt;detail Customer Master&lt;/a&gt;&lt;/li&gt;
                      &lt;li&gt;&lt;a href="#"&gt;update Customer Master&lt;/a&gt;&lt;/li&gt;
                      &lt;li&gt;&lt;a href="#"&gt;detail Account&lt;/a&gt; - Click on suburb &lt;i class="fa fa-info-circle"&gt;&lt;/i&gt;&lt;/li&gt;
                      &lt;li&gt;&lt;a href="#"&gt;Lookup Screen(Generic)&lt;/a&gt; - Click on suburb &lt;i class="fa fa-search"&gt;&lt;/i&gt;&lt;/li&gt;
                  &lt;/ul&gt;
              &lt;/div&gt;
              &lt;div fxFlex="26%"&gt;
                  &lt;h3&gt;Keyboard Shortcuts&lt;/h3&gt;
                  &lt;ul&gt;
                      &lt;li&gt;&lt;Ctrl + b: Go back/li&gt;
                      &lt;li&gt;Ctrl + i: Launch info&lt;/li&gt;
                      &lt;li&gt;Ctrl + h: Launch help&lt;/li&gt;
                      &lt;li&gt;Ctrl + l: Show or hide menu&lt;/li&gt;
                      &lt;li&gt;Ctrl + n: Add new item&lt;/li&gt;
                      &lt;li&gt;Ctrl + p: Print&lt;/li&gt;
                      &lt;li&gt;Ctrl + r: reload table data&lt;/li&gt;
                      &lt;li&gt;Ctrl + &lt;em&gt;any other&lt;/em&gt; page specific function you ned&lt;/li&gt;
                  &lt;/ul&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div fxLayout&gt;
              &lt;h2&gt;Quick Links &amp;amp; Favourites&lt;/h2&gt;
          &lt;/div&gt;
          &lt;div fxLayout&gt;
  &lt;div fxFlex="40%"&gt;
      &lt;mat-list&gt;
              &lt;mat-list-item&gt;         
                  &lt;mat-icon mat-list-icon class="fa fa-archive fa-2x"&gt;&lt;/mat-icon&gt;
                  &lt;a matLine href="#"&gt;Stock System&lt;/a&gt;                
                  &lt;span matLine&gt;Nam ultricies enim id sapien dignissim, in facilisis neque blandit, te corrumpit vituperata constituam pri.&lt;/span&gt;                
              &lt;/mat-list-item&gt;
              &lt;mat-list-item&gt;
                  &lt;mat-icon mat-list-icon class="fa fa-shopping-cart fa-2x"&gt;&lt;/mat-icon&gt;
                  &lt;a matLine href="#"&gt;Sales Purchases&lt;/a&gt;             
                  &lt;span matLine&gt;Donec cursus augue sit amet suscipit volutpat. Ne dignissim sadipscing pro. Munere scripta temporibus mel at.&lt;/span&gt;
              &lt;/mat-list-item&gt;
              &lt;mat-list-item&gt;
                  &lt;mat-icon mat-list-icon class="fa fa-sticky-note fa-2x"&gt;&lt;/mat-icon&gt;
                  &lt;a matLine href="#"&gt;Stock Ordering&lt;/a&gt;              
                  &lt;span matLine&gt;Integer placerat libero ac dui hendrerit lacinia. Brian semper constituto, ignota aperiri adversarium ne vix.&lt;/span&gt;
              &lt;/mat-list-item&gt;
              &lt;mat-list-item&gt;
                  &lt;mat-icon mat-list-icon class="fa fa-book fa-2x"&gt;&lt;/mat-icon&gt;
                  &lt;a matLine href="#"&gt;Ledger System&lt;/a&gt;
                  &lt;span matLine&gt;&lt;a href="#"&gt;Ledger System&lt;/a&gt; &amp;raquo; 
                  &lt;a href="#"&gt;Sales Ledger&lt;/a&gt;&amp;raquo;
                  &lt;a href="#"&gt;Customer Master Files&lt;/a&gt;&amp;raquo;
                  &lt;a href="#"&gt;Customer Master&lt;/a&gt;&lt;/span&gt;
                  &lt;span matLine&gt;Purus scelerisque, dapibus felis sit amet, accumsan est.&lt;/span&gt;
              &lt;/mat-list-item&gt;
              &lt;mat-list-item&gt;
                  &lt;mat-icon mat-list-icon class="fa fa-money fa-2x"&gt;&lt;/mat-icon&gt;
                  &lt;a matLine href="#"&gt;POS Control&lt;/a&gt;             
                  &lt;span matLine&gt;Pellentesque id purus scelerisque, dapibus felis sit amet, accumsan est. Diceret dissentiunt ad sea, te corrumpit vituperata constituam pri.&lt;/span&gt;
              &lt;/mat-list-item&gt;
              &lt;mat-list-item&gt;
                  &lt;mat-icon mat-list-icon class="fa fa-tablet fa-2x"&gt;&lt;/mat-icon&gt;
                  &lt;a matLine href="#"&gt;PDCU Control&lt;/a&gt;                
                  &lt;span matLine&gt;In vestibulum dui sed dapibus accumsan. Id est semper constituto, ignota aperiri adversarium ne vix.&lt;/span&gt;
              &lt;/mat-list-item&gt;
              &lt;/mat-list&gt;
          &lt;/div&gt;
          &lt;div fxFlex="40%"&gt;
              &lt;mat-list&gt;
                  &lt;mat-list-item&gt;
                      &lt;mat-icon mat-list-icon class="fa fa-line-chart fa-2x"&gt;&lt;/mat-icon&gt;
                      &lt;a matLine href="#"&gt;Price Change System&lt;/a&gt;             
                      &lt;span matLine&gt;Integer placerat libero ac dui hendrerit lacinia. Brian semper constituto, ignota aperiri adversarium ne vix.&lt;/span&gt;
                  &lt;/mat-list-item&gt;
                  &lt;mat-list-item&gt;
                      &lt;mat-icon mat-list-icon class="fa fa-building fa-2x"&gt;&lt;/mat-icon&gt;
                      &lt;a matLine href="#"&gt;HO Coms&lt;/a&gt;             
                      &lt;span matLine&gt;Donec cursus augue sit amet suscipit volutpat. Ne dignissim sadipscing pro. Munere scripta temporibus mel at.&lt;/span&gt;
                  &lt;/mat-list-item&gt;
                  &lt;mat-list-item&gt;
                      &lt;mat-icon mat-list-icon class="fa fa-plane fa-2x"&gt;&lt;/mat-icon&gt;
                      &lt;a matLine href="#"&gt;Auto Pilots&lt;/a&gt;             
                      &lt;span matLine&gt;Fusce eget velit tincidunt erat sollicitudin eleifend in in odio. Integer placerat libero ac dui hendrerit lacinia.&lt;/span&gt;
                  &lt;/mat-list-item&gt;
                  &lt;mat-list-item&gt;
                      &lt;mat-icon mat-list-icon class="fa fa-hashtag fa-2x"&gt;&lt;/mat-icon&gt;
                      &lt;a matLine href="#"&gt;Additional&lt;/a&gt;              
                      &lt;span matLine&gt;Fusce eget velit tincidunt erat sollicitudin eleifend in in odio. In vestibulum dui sed dapibus accumsan.&lt;/span&gt;
                  &lt;/mat-list-item&gt;
                  &lt;mat-list-item&gt;
                      &lt;mat-icon mat-list-icon class="fa fa-desktop fa-2x"&gt;&lt;/mat-icon&gt;
                      &lt;a matLine href="#"&gt;Workspaces&lt;/a&gt;              
                      &lt;span matLine&gt;matLinePellentesque id &lt;a href="#"&gt;Customer Master&lt;/a&gt; purus scelerisque, dapibus felis sit amet, accumsan est.&lt;/span&gt;
                  &lt;/mat-list-item&gt;
                  &lt;mat-list-item&gt;
                      &lt;mat-icon mat-list-icon class="fa fa-cogs fa-2x"&gt;&lt;/mat-icon&gt;
                      &lt;a matLine href="#"&gt;System Config&lt;/a&gt;               
                      &lt;span matLine&gt;Pellentesque id purus scelerisque, dapibus felis sit amet, accumsan est. Diceret dissentiunt ad sea, te corrumpit vituperata constituam pri.&lt;/span&gt;
                  &lt;/mat-list-item&gt;                
              &lt;/mat-list&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;div fxLayout&gt;
          &lt;div fxFlex="80%"&gt;
              &lt;hr&gt;
              &lt;p&gt;Numquam honestatis neglegentur ex duo, ad vix movet tollit tantas. Cu quaeque labores debitis vis, dicta eruditi eligendi ex vim. Est mentitum
                  voluptaria te. Decore aperiri explicari cu usu, suas saepe accumsan ea usu. In vim modo accusata, ad audire delenit prodesset usu.&lt;/p&gt;
              &lt;hr&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;div fxLayout fxLayoutGap="20px"&gt;
          &lt;div fxFlex="26%" class="centered"&gt;
              &lt;h2&gt;Heading&lt;/h2&gt;
              &lt;p&gt;
                  Donec sed odio dui. Etiam porta sem malesuada magna mollis euismod. Nullam id dolor id nibh ultricies vehicula ut id elit. Morbi leo risus,
                  porta ac consectetur ac, vestibulum at eros. Praesent commodo cursus magna.
              &lt;/p&gt;
              &lt;p&gt;&lt;button mat-raised-button&gt;&lt;a href="#"&gt;View Details&lt;/a&gt;&lt;/button&gt;&lt;/p&gt;
          &lt;/div&gt;
          &lt;div fxFlex="26%" class="centered"&gt;
              &lt;h2&gt;Heading&lt;/h2&gt;
              &lt;p&gt;
                  Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras mattis consectetur purus sit amet fermentum.
                  Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh.
              &lt;/p&gt;
              &lt;p&gt;&lt;button mat-raised-button&gt;&lt;a href="#"&gt;View Details&lt;/a&gt;&lt;/button&gt;&lt;/p&gt;
          &lt;/div&gt;
          &lt;div fxFlex="26%" class="centered"&gt;
              &lt;h2&gt;Heading&lt;/h2&gt;
              &lt;p&gt;
                  tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.
              &lt;/p&gt;
              &lt;p&gt;&lt;button mat-raised-button&gt;&lt;a href="#"&gt;View Details&lt;/a&gt;&lt;/button&gt;&lt;/p&gt;
          &lt;/div&gt;
      &lt;/div&gt;
          &lt;div fxLayout fxLayoutGap="20px"&gt;
          &lt;div fxFlex="26%" class="centered"&gt;
              &lt;h2&gt;Heading&lt;/h2&gt;
              &lt;p&gt;
                  Donec sed odio dui. Etiam porta sem malesuada magna mollis euismod. Nullam id dolor id nibh ultricies vehicula ut id elit. Morbi leo risus,
                  porta ac consectetur ac, vestibulum at eros. Praesent commodo cursus magna.
              &lt;/p&gt;
              &lt;p&gt;&lt;button mat-raised-button&gt;&lt;a href="#"&gt;View Details&lt;/a&gt;&lt;/button&gt;&lt;/p&gt;
          &lt;/div&gt;
          &lt;div fxFlex="26%" class="centered"&gt;
              &lt;h2&gt;Heading&lt;/h2&gt;
              &lt;p&gt;
                  Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras mattis consectetur purus sit amet fermentum.
                  Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh.
              &lt;/p&gt;
              &lt;p&gt;&lt;button mat-raised-button&gt;&lt;a href="#"&gt;View Details&lt;/a&gt;&lt;/button&gt;&lt;/p&gt;
          &lt;/div&gt;
          &lt;div fxFlex="26%" class="centered"&gt;
              &lt;h2&gt;Heading&lt;/h2&gt;
              &lt;p&gt;
                  tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.
              &lt;/p&gt;
              &lt;p&gt;&lt;button mat-raised-button&gt;&lt;a href="#"&gt;View Details&lt;/a&gt;&lt;/button&gt;&lt;/p&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;div fxLayout&gt;
          &lt;div fxFlex class="centered"&gt;
              &lt;p&gt;Copyright Trade Link &amp;copy; 2017&lt;/p&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>my styles.css:</strong></p>
  
  <pre><code>@import '~@angular/material/prebuilt-themes/deeppurple-amber.css';
  
  body {
      font-family: 'Roboto', sans-serif;
      max-width: 100%;
      x-overflow: hidden;
      max-width: 90%;
  }
  
  my home component's css:
  
  
  .fill-remaining-space {
      flex: auto;
  }
  
  .rhs {
      display: flex;
      align-items: center;
      justify-content: center;
  }
  
  .rhs-item {
      margin-right: 20px; 
  }
  
  .rhs-icon {
      margin-right: 5px;
      display: inline-flex;
      vertical-align: middle;
  }
  
  
  /*.custom-sidenav-container { 
  position: inherit;
  display: inherit;
  transform: inherit;  
  }*/
  
  
  mat-sidenav {
  //  width: 300px;
      margin-top: 65px;
      border: 1px solid rgba(0, 0, 0, 0.5);
      position: fixed;
      left: 0;
  }
  
  .sn-list {
      list-style: none;
  }
  
  .sn-list li {   
      cursor: pointer;    
      margin-bottom: 10%;
  }
  
  .sn-item {  
      display: inline-flex;
      vertical-align: middle;
  }
  
  .toolbar {
      position: fixed;
      left: 0;
      top: 0;
      right: 0;
  }
  </code></pre>
  
  <p><strong>my dashboard component's css:</strong></p>
  
  <pre><code>.centered {
      text-align: center;
  }
  </code></pre>