0

I have two ngFors for each element (hero or villain)

<div class="listeHeroes">
    <a *ngFor="let hero of heroes" class="list-group-item list-group-item-action"
       routerLink="/herodetail/{{hero.id}}">
      {{hero.name}}

    </a>
</div>

<div class="listeVillains">

    <a *ngFor="let villain of villains"class="list-group-item list-group-item-action"
       routerLink="/villaindetail/{{villain.id}}">

        {{villain.name}}

    </a>
</div>

I already made the width to 50% so 2 elements fit into one line

.listeHeroes {
  width: 50%;
  text-align: left;
}

.listeVillains {
  width: 50%;
  text-align: right;
}

I wanted the heroes on the left and the villains on the right, but text-align doesn't move the whole element to the right, only the text. How do I make them as I described?

This is how it looks right now: https://i.stack.imgur.com/f9BjH.jpg

m4n0
  • 29,823
  • 27
  • 76
  • 89

0 Answers0