0

I want to add custom styling to text area height, border, color etc

This is Component

<lightning:textarea name="notes" value="" class="topText" label="Notes" maxlength="300" />

This is css

.THIS.topText{
   border-color: #020202;
   height:73px;
}

But this is not getting applied. Class is applied to other division enter image description here

1 Answer 1

3

One way is to make use of the CSS selector that says style the element that is a child of the element that has the class:

.THIS .topText textarea {
   border-color: #020202;
   height:73px;
}
1
  • Nice answer keith! I wish I had learnt CSS specificity a bit earlier. It make things so simpler.
    – Raul
    Feb 2, 2018 at 10:08

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.