Attribute selectors

SOLVED.

input[type=‘submit’] {

display: block;

width: 60%;

}

To style the submit button, you can use an attribute selector, which selects an element based on the given attribute value. Here is an example:

input[name="password"]

The above selects input elements with a name attribute value of password .

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

Hint

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

I did the following, but doesn’t work:

input[type=“submit”]

submit {

display: block;

width: 60%;

}

Challenge: Step 50

Link to the challenge:

1 Like

You have an extra submit in the css, the tests fail because of that.

but this is the 1st code w submit in css, the previos ones are in html

I can’t really understand what you mean by this… can you explain a bit more.

u told that there was an extra submit, but I didn’t write any code pointing to submit button before (in this project)

or maybe you meant that submit repeats twice here:
input[type=“submit”]

submit {

display: block;

width: 60%;

}

but how do I fix that?

Look at this code after the input[type="submit"] you have another submit. I was pointing to this extra submit after input[type="submit"]

(post deleted by author)

Thanks for the helpful information

(post deleted by author)

Mod Edit: SOLUTION REMOVED

You use “” this one instead of “” this one and also use submit a double time. Solution is here:

Mod Edit: SOLUTION REMOVED

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.

1 Like