I’m having trouble with this step of the challenge.
My code is written correctly, but it says it’s not correct. I don’t understand what’s going on and I need help.
.info input, .info label {
display: inline-block;
text-align: right;
}
.info input {
width: 50%;
text-align: left;
}
.info label {
width: 10%;
min-width: 55px;
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36
Challenge: Learn Accessibility by Building a Quiz - Step 56
Link to the challenge:
what hint are you getting?
I did as the tip is indicating but it is not working for me.
the hint says to give the label element a text-align of right.
Where is your text-align statement now?
(is it only being applied to label elements? or to more than that?)
It’s here as indicated but it’s not working. I do not understand why
look carefully, is the text-align: right being applied only to label elements?
edit: for eg. If you look at the min-width property. Which elements are getting that property?
Now I realized where the problem was and I fixed it. thank you man
1 Like
The test has a bug in it.
Your code is correct.
@hbar1st The following CSS makes both input and label elements that are descendants of div elements with class="info"
have right text alignment.
.info input, .info label {
display: inline-block;
text-align: right;
}
Then, in the following line:
.info input {
width: 50%;
text-align: left;
}
only the input elements that are descendants of div elements with class = info
are set with left text alignment. So in the end, only the label elements have right aligned text. Otherwise, you would see the text in the input elements shifted to the right (which is not the case here).
i always wondered why they insisted on having that new block be at the top. But maybe the intention was to have the 2 rules in it? (not sure)
Regardless, the tests should pass valid (and correct) CSS.
hbar1st
October 21, 2022, 9:38pm
11
I added a comment mentioning that you found a bug here:
opened 02:39PM - 18 Sep 22 UTC
type: bug
status: discussing
scope: curriculum
### Describe the Issue
i just noticed that, starting from the [Learn Accessibil… ity by Building a Quiz 1](https://www.freecodecamp.org/learn/2022/responsive-web-design/learn-accessibility-by-building-a-quiz/step-1) class, i started to see many more codes i haven’t seen before, none of them really introduced, but was just told to write them down or had to research them based on the prompt.
it felt a bit like a drastic change compared to the previous classes.
i can understand that it might be hard and time/energy consuming to "introduce" new codes every time, but since it has been done fairly well up until that point, it felt weird that that wasn't an option anymore.
maybe it could be better if you let people know since the beginning that there are other sources they should/could check during the course of the projects to understand better all the bits and bobs?
### Affected Page
https://www.freecodecamp.org/learn/2022/responsive-web-design/learn-accessibility-by-building-a-quiz/step-1
### Your code
```
none
```
### Expected behavior
either a constant general "behaviour" similar throughout a course or an heads up early on saying that things might differ from project to project and that the best way to deal with it is x y z.
### Screenshots
_No response_
### System
- Device: Zenbook
- OS: Linux Mint 20.3
- Browser: Brave
- Version: v1.43.93
### Additional context
_No response_
hbar1st
October 21, 2022, 10:03pm
12
also Shaun opened an issue
opened 09:56PM - 21 Oct 22 UTC
type: bug
scope: curriculum
first timers only
### Describe the Issue
As described in the below forum post, there is ambiguity… in the lesson's instructions.
The intention is for Campers to add `text-align: right` to **only** the `.info label` elements.
However, the instructions do not make this clear
### Affected Page
https://www.freecodecamp.org/learn/2022/responsive-web-design/learn-accessibility-by-building-a-quiz/step-56
### Your code
```css
.info input, .info label {
display: inline-block;
text-align: right;
}
.info input {
width: 50%;
text-align: left;
}
.info label {
width: 10%;
min-width: 55px;
}
```
### Expected behavior
The instructions should be changed to say:
> Also, align only the `label` elements' text to the right.
### Screenshots
_No response_
### System
N/A
### Additional context
https://forum.freecodecamp.org/t/learn-accessibility-by-building-a-quiz-step-56/565245
---
An issue with the https://github.com/freeCodeCamp/freeCodeCamp/labels/first%20timers%20only label is open for contribution. The first comprehensive PR created will be reviewed and merged. We typically do not assign issues to anyone other than long-time contributors.
If you would like to contribute, and have not read the contributors docs, please do so here: https://contribute.freecodecamp.org/#/
If you have any issues with contributing, be sure to join us on the [contributors channel](https://discord.com/channels/692816967895220344/715074489422970962), or on the [contributors sub-forum](https://forum.freecodecamp.org/c/contributors/3)
ilenia
October 22, 2022, 1:36pm
13
To understand what happened, that was the required solution until a couple of weeks ago, but it was requiring to do a confusing usage of precedence rules without saying so