+ Start a Discussion
Nagesh B 13Nagesh B 13 

Lightning Component challenge in trialhead.

Hi Everyone,

I am not able to achieve the challenge in trial head  for below lightening concept.

Create a simple Lightning component with a styled headline. The headline must use an H1 tag with a CSS class that enforces a 24px font-size. Make the component available in the Navigation Menu of Salesforce1.
The component must be named 'MyLightningComponent'.
The component must include an H1 tag with a CSS class named 'headline'. The 'headline' CSS class must set a font-size of 24px.
The Lightning Component tab that is added to Salesforce1 must be called 'MyLightning'

i have created below components in my org.

1) MyLightningComponent.cmp

<aura:component implements="force:appHostable">
    <div class="headline">
        <h1>Headline</h1>
    </div>
</aura:component>

2) When i click 'style' button , 'MyLightningComponent.css' was created automatically and i have written below code.

.THIS.headline {
    padding-top: 24px;
}
 
I am getting below error when i check the challenge.  please any body suggest me if i am doing wrong.

Challenge Not yet complete... here's what's wrong:
The component does not include an H1 tag with a 'headline' CSS class


Thanks,
Nag.


 
Abhi_TripathiAbhi_Tripathi
Hi Nagesh,

try this code
 
<!-- MyLightningComponent.cmp -->
<aura:component implements='force:appHostable'>
    <div class="headline">
<h1 class="headline">Hello Lightning Component!</h1>    </div>
</aura:component>

 
Nagesh B 13Nagesh B 13
Thanks Abhi. :):)