0

I am calling error-stuff directive in my view as below and i am trying to override the directive's padding 15px to 0px in my view which is not working. So my div1's value and div2's values are not in a straight line since div2 takes more padding in my view.

 Error:
          Oops !!! Its look like something going wrong !!! Please try again later ...


<div id="div1" class="row">
   <div  class="pull-left">
      <span>Error :</span>
   </div>

    <div id="div2" style="padding:0px; vertical-align:top">
        <error-stuff></error-stuff>
    </div>
</div>

The html template on the error-stuff directive as below

<div class="error-class">
   <span>Oops !!! Its look like something going wrong !!! Please try again later 
    ...  </span>
</div>

in my app.css

.error-class
{
margin-bottom:20px;
padding:15px;
box-sizing:border-box;
line-height:1.5;
font-size:15px;
}

So how do i make div1 and div2 content in straight line by overriding the directives padding:15px to padding:0px?

||||||
0

Assuming error-stuff is used somewhere else and you can't change the global css, in this case you can use a targeted override by specifying the parent in css

#div2 .error-class {
    padding: 0;
}
||||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.