0 added
0 removed
Original
2026-01-01
Modified
2026-03-09
1
<p>We have now programmed a “show password” feature. Now we need to make a scale that will provide users with feedback about the reliability of the password that they have entered. The scale is a thin bar at the bottom of the “Password” field that should grow with each entered character. If the password is too short, the bar should be red, if it is of average length, then it should be yellow, and if it is sufficiently long, then it should be green.</p>
1
<p>We have now programmed a “show password” feature. Now we need to make a scale that will provide users with feedback about the reliability of the password that they have entered. The scale is a thin bar at the bottom of the “Password” field that should grow with each entered character. If the password is too short, the bar should be red, if it is of average length, then it should be yellow, and if it is sufficiently long, then it should be green.</p>
2
<p>The bar should increase in length with each entered character. It would be cumbersome to create a separate class for each password length. Therefore, we will change the element style using the style property. What CSS property do I need to change to make the bar longer? Since it is positioned horizontally, the width property that is responsible for the element’s width must be changed.</p>
2
<p>The bar should increase in length with each entered character. It would be cumbersome to create a separate class for each password length. Therefore, we will change the element style using the style property. What CSS property do I need to change to make the bar longer? Since it is positioned horizontally, the width property that is responsible for the element’s width must be changed.</p>
3
<p>Initially the bar has a length of 0% and cannot be seen:</p>
3
<p>Initially the bar has a length of 0% and cannot be seen:</p>
4
<p>And this is how it will look if you assign it a width of 50%.</p>
4
<p>And this is how it will look if you assign it a width of 50%.</p>
5
<p>If the element width is assigned as a percentage, it is calculated<i>relative</i>to the width of the parent element. If the width of the parent is 200px, then the nested element with the width of 50% will have an <i>absolute</i>width of 100px. You can learn more about relative and absolute values in <a>this assignment</a>.</p>
5
<p>If the element width is assigned as a percentage, it is calculated<i>relative</i>to the width of the parent element. If the width of the parent is 200px, then the nested element with the width of 50% will have an <i>absolute</i>width of 100px. You can learn more about relative and absolute values in <a>this assignment</a>.</p>
6
<p>The bar has the security-bar class. Find it, write it to a variable, and assign it a width of 50%.</p>
6
<p>The bar has the security-bar class. Find it, write it to a variable, and assign it a width of 50%.</p>