hello guys I am unable to pass this step 56 Challenge: Learn Accessibility by Building a Quiz - Step 56
Link to the challenge:
I wrote like this
.info > label, .info > input {
display: inline-block;
text-align: right;
}
but
it is giving a hint
You should set the text-align: right property before the .info input rule
can anybody teach me
It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.
We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.
I think this is ok to say regarding the problem. I just remembered this. The rule regarding over riding classes and id is depending on location of it. Im not a hundred percent sure, but it depends on this. With classes the parent over rides the children. so by putting the two above the input would override it is in css
You are setting both the label and input to text-align: right and then overwriting that for the input in the selector below the list selector.
As I said, it isn’t how I would do it and I don’t think it is a good use of the cascade, to be honest.
Example
<article>
<h2>Title</h2>
<p>Lorem, ipsum dolor sit amet consectetur adipisicing elit. Labore soluta adipisci ratione cumque tenetur et explicabo omnis quas, facere hic minima laborum temporibus doloribus quasi est eaque unde neque iure!</p>
</article>
article h2,
article p {
margin-top: 0;
/* Both elements are red */
color: red;
}
article p {
/* overwrite it for the p element to be blue */
color: blue;
}
I would suggest doing this instead.
article h2,
article p {
margin-top: 0;
}
article h2 {
color: red;
}
article p {
color: blue;
}