Selecting child element based on its class name is not working

react component

<div className={styles.input}>
            <p className="titleText">{titleText}</p>
            <p>{headerText}</p>
.....

CSS selector

.titleText {
  width: 54px;
  height: 12px;
  font-size: 12px;
  line-height: 12px;
  color: #333333;
}

But style is not getting applied to <p className="titleText">{titleText}</p>, please clarify what’s wrong with the selector of child element ?

Thanks,
Vikram

Hi @vikramvi ,

This is working for me. Maybe the problem lies with {titleText} or {styles.input}.
Could you try debugging by blanking those out to eliminate that possibility.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.