ab1004
ab1004

Reputation: 137

How to rectify CSS styling in Angular after injecting Selector in your HTML?

I'm trying to break repeating code into components just to make the code clean. But when I converted a chunk of code into a component and use its selector in the code, the styling breaks.

So basically, this is what I'm getting right now:

What is And this is what I'm trying to get:

What should

As you can see, the main content shifts downward. Even though, I placed the selector exactly where the code was present before. How do I prevent this from happening?

StackBlitz Link: https://stackblitz.com/edit/angular-ivy-mk3swj?file=src/app/app.component.html

Upvotes: 0

Views: 72

Answers (1)

JsNgian
JsNgian

Reputation: 835

Please try this

   <div class="feature style">
     <div class="row">
       <app-nav-menu class="col-md-3 col-lg-3"></app-nav-menu>
       <div class="col-md-9 col-lg-9">
         <div class="row rs-counter resource">
             ...
         </div>
       </div>
     </div>
   </div>

Upvotes: 1

Related Questions