Step 56 - Learn Accessibility by Building a Quiz

What do I do wrong?

" Step 56

To align the input boxes with each other, set the display property to inline-block for all input and label elements within .info elements.

Also, align the text to the right."

.info input {
  width: 50%;
  text-align: right;
  display: inline-block;
}

.info label {
  width: 10%;
  min-width: 55px;
  text-align: right;
display: inline-block;

}

and the error is:

You should use either a .info > label, .info > input or .info label, .info input selector.

As far as I know the selector should be placed before { }. I tried with selectors .info > label, .info > input and .info label, .info input and it just doesn’t work.

1 Like

would you mind linking us the step you are on?

1 Like

This is beta course

Hi @Spychu1993 !

I would reset the lesson.
You are not supposed to change these existing selectors.

.info input {
  width: 50%;
  text-align: left;
}

.info label {
  width: 10%;
  min-width: 55px;
}

You need to create a new selector above that with inline-block and text-align right values.

That is what this message here is telling you

Hope that makes sense!

5 Likes

@jwilkins.oboe that’s right, thank you!

@jwilkins.oboe
Your response also helped me! I had made a separate selector but it was below the existing selectors. Could you elaborate on why that placement is important? My guess is that the .info input selector below specifies text to be aligned to the left.

1 Like

I don’t believe it matters, actually, but the lessons algorithm will compare the results with the stored existing results, if it’s different it will be flagged as wrong, not because the result is wrong, but because this is how it’s made.

I was helped by your post. The key is to make only one (a selector as specified) additional selector with a comma to separate the new combination selector.

3 Likes

thank you! this helped me as well, I need to slow down and carefully read the instructions/hints obviously haha

text-align; right does not work for me.
image

HI @gaboxp !

Welcome to the forum!

If you need help with a lesson, please create a new post with your code and the lesson link and we can help you there

Thanks :slight_smile: