0

enter image description here

enter image description here enter image description here

I am trying to align the bottom picture to the right of the table. I know that i am missing a small setting here, but cant seem to find it. At the bottom code it is the saleForMonth element that I want to align it to the right.

   <mat-sidenav-container>
    <mat-sidenav-content style="height:99vh;">
        <div style="float:left; margin:22px 0px 0px 32px;">
            <div style="text-align:center;">
            </div>
            <button mat-raised-button type="button" style="background-color:#3378a8;color:WHITE;height:45px;" (click)="sidenavOpen('sale',sidenav)">
                <b>SALE</b>
            </button>
            <button mat-raised-button type="button" style="background-color:#3378a8;color:WHITE;height:45px;margin-left:2px;" (click)="sidenavOpen('upgrade',sidenav)">
                <b>UPGRADE</b>
            </button>
            <div style="margin-top:53px">
                <div>
                    <salesByPackage></salesByPackage>
                </div>
                <div style="margin-top:240px;">
                    <salesByCampaign></salesByCampaign>
                </div>
            </div>
        </div>
        <div class="container" style="margin-top:20px;float:right">
                <div class="col-lg-9">
                  <mat-tab-group #tab mat-stretch-tabs (selectedTabChange)="onTabClick($event)">
                      <mat-tab label="SALES">
                          <orders></orders>
                      </mat-tab>
                      <mat-tab label="UPGRADES">
                          <upgrades></upgrades>
                      </mat-tab>
                  </mat-tab-group>
              </div>
              <!-- Change to this -->
              <div class="col-lg-3">
                  <div>
                      <salesForMonth></salesForMonth>
                  </div>
              </div>
              </div>
    </mat-sidenav-content>
2
  • have you tried style="float:right"? on div Commented May 25, 2018 at 4:33
  • Yes I already did, it didn't work out Commented May 25, 2018 at 4:40

3 Answers 3

1
<div class="row" style="float:right">
  <div class="col-lg-3">
    <salesForMonth></salesForMonth>
  </div>
</div>

Or you can use empty div at the left side and set it with col-lg-9

<div class="row">
  <div class="col-lg-9">

  </div>
  <div class="col-lg-3">
    abc
  </div>
</div>
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks everybody for joining in.
0

If your component salesForMonth is not of full width, Try this CSS -

    <div style='width:100%; float:right'>
        <salesForMonth></salesForMonth>
    </div>

else just put float:right on your element.

5 Comments

Can you reproduce it on stackblitz?
its going to be a bit hard with this complex setup I have.
With putting float:right this way <div style="float:right"> <salesForMonth></salesForMonth> </div> I was able to bring it to the right side bottom to the table.
OH, so you mean you want it to adjust it right side of table not on bottom right, I am right?
Yes that is the way I am aiming for
0
    <div class="container col-lg-9" style="margin-top:20px;float:right">
        <mat-tab-group #tab mat-stretch-tabs (selectedTabChange)="onTabClick($event)">
            <mat-tab label="SALES">
                <orders></orders>
            </mat-tab>
            <mat-tab label="UPGRADES">
                <upgrades></upgrades>
            </mat-tab>
        </mat-tab-group>
    </div>
    <!-- Change to this -->
    <div class="container col-lg-3">
        <div>
            <salesForMonth></salesForMonth>
        </div>
    </div>

put those 2 blocks into container and partition them as col-lg-9 and col-lg-3

2 Comments

I got the 3rd pic uploaded with the above setting. It changed the whole setup
@Sumchans you sure? coz we made changes to last 2 blocks only.. but your image show changes on 'SHOW' and 'UPGRADE' tab too.. can you show the changes you made?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.