title: How to access the previous sibling through an angular directive?
body: <p>At the moment, I'm using ELEMENTREF to access the DOM through the Redenrer2. Here's a basic example:</p>
  
  <pre><code>import { Directive, Renderer2, ElementRef } from '@angular/core';
  
  @Directive({
    selector: '[appHighlight]'
  })
  export class HighlightDirective {
  
    constructor(private renderer: Renderer2, private el: ElementRef) {
      this.renderer.setStyle(this.el.nativeElement, 'background', 'yellow');
    }
  
  }
  </code></pre>
  
  <p>The above code was just a test to leave the syntax highlight with the yellow color.</p>
  
  <p>However, I need to know how do I access the previous element and capture the width of it to move to a left-style property?</p>
  
  <p>Ex: Former brother has the width of 400px. The current element has the left of 400px.</p>
  
  <p>I'm counting on the collaboration.</p>