Step 52 building a registration form

Now, use the attribute selector to style the submit button with a display of block , and a width of 60% .

input[type=“submit”]

{
display: block;

width: 60%;
}

Hint

You should use an attribute selector of input[type="submit"] to style the submit button

Hi @annietwat ,
Checking on this line -

Hint: The quotes “ and ” aren’t same as " and ".

Further Explanation:
During CSS parsing It gets converted to
“ and ” Browser engine has no idea about an element with this selector value - input[type=“submit” ] and ends up finding no element from the HTML document so you see no style applied to input>submit element .

A simple Proof of Concept: [Pls ignore, Not relevant to the current exercise. Just make sure to not use special quotes]

<!-- This works -->
<style>
  input[type=“submit”] {
    display: block;
    width: 60%;
    background: red;
  }
</style>
<input type="&ldquo;submit&rdquo;" value="submit"

/>


Feel free to ask any question related to this.

– Amit.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.