Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

299
Views
Angular router-outlet chilld doesn't take all width

I have a router outlet in a component. The child component doesn't take the whole width. I tried to give to the child's div width:100%, min-width:100%, also with !important, but it's not working. How can I force the child's div to take the whole width available? Parent HTML:

<div fxLayout="column" fxLayoutAlign="space-between stretch">
    <div>
          ...
    </div>

    <div fxLayout="row" fxFlexFill>
        <div class="navbar" fxLayout="column">
        </div>
        <div class="mainDiv" fxFlex>
            <router-outlet></router-outlet>
        </div>
    </div>

    <div fxLayoutAlign="end"></div>
</div>

Parent CSS:

.navbar {
    padding-top: 40px;
    padding-right: 80px;
    border-top: none;
}

.mainDiv {
    width: 100%;
    border-top: none;
}

Child CSS:

<div class="container">...</div>
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Try set the router-outlet inside a div without using flex:

<div style="width: 100%;height: 100%">
<router-outlet ></router-outlet>
  </div>
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!