Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

298
Views
class is not shown in elements inspector in chrome

as shown in the image and in the circled parts, i created a class called clsTest. in this class i would like to change the position and some propertities of the circled element in red as shown in the image. the circled elements in red are composed of input field and icon of the calendar. when i activate the elements inspector in chrome, the class clsTest is never present or listed among other classes. in other words ,as shown in the image, the class .clr-control-container is shown but the class clsTestis not!!

please let me know how to correctly assign a class and be able to modify its attributes to change the position and properties of the circled element in red.

html:

<clr-date-container class="clsDateContainer">
            <label id="idDateOfSprayLabel">
                <p>Date:</p>
            </label>
            <input id="idDateOfSprayValue" class="clsTest clr-control-container" clrDate type="date" placeholder="Specify date of spray" [(ngModel)]="iDatePasser.dateOfSpray" (ngModelChange)="onDateOfSpraySet($event)" name="dateOfSpray"
                value="2021-07-21" min="2021-01-01" max="2090-12-31" />
        </clr-date-container>

css:

.clsTest{
bottom: 10;
right: 0px;
left: 430px;
top: 174px;
width: auto;

}

image:

enter image description here

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

I assume the default Angular style encapsulation is causing this behavior here.

Try adding the pseudo class :host to your css like this:

:host .clsTest{
  bottom: 10;
  right: 0px;
  left: 430px;
  top: 174px;
  width: auto;
}

The :host tells Angular to apply the styles directly on DOM elements (not based on components/templates). Optionally, you could also add ::ng-deep to apply styles to all children of the selected element as well (where the CSS selector matches as well).

about 4 years ago · Juan Pablo Isaza Report

0

The input has the class at the moment

To see the classes of the input element just click on it(in the Element section of chrome developer tools), I specify it on the image.

Keep in mind the sequence of the classes you give to an element is important. The second class will override the first one.

Image was updated

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!