0
<div id="chart-id-149" class="big_number_total">
  <div class="superset-legacy-chart-big-number  no-trendline" style="height: 98px;">
    <div class="header-line" style="font-size: 18px; height: 49px;">
      <span>30</span>
    </div>
    <div class="subheader-line" style="font-size: 3px; height: 30px;">% Conversions</div>
  </div>
</div>

Kindly note that I want to reference subheader-line class for the id: chart-id-149. So the condition should be the text within id of chart-id-149 and class subheader-line should have the colour blue.

Here's what my code looks like:

#chart-id-149.subheader-line {
    color: blue;
}

But I see no effect, please do let me know where am I going wrong.

3
  • 2
    You need space before class: #chart-id-149 .header-line Commented Jun 3, 2020 at 13:57
  • 1
    please note you say you wish the .subheader-line to contain blue text but the css is targeting .header-line Commented Jun 3, 2020 at 14:00
  • @LukasJ thanks, yeah this sorted my problem. Ramon de Vires thanks, made the correction. Commented Jun 3, 2020 at 14:03

2 Answers 2

2

you are missing a space before dot (.)

#chart-id-149 .header-line
{
    color: blue;
}
Sign up to request clarification or add additional context in comments.

Comments

1

Descendant elements are selected with a space in CSS, so you need:

#chart-id-149 .header-line

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.