Problem with id Attribute and Style element

Problem with id Attribute and Style element
0

#1

Hi All,

I have read some of the other posts on this topic and I am still stuck. I keep getting the message that my background color should be green.

Note: When I change the wording in my id element from “form” to “element” I have a green background towards the bottom of the form but I get two of my requirements wrong like in this link here

So when I change the wording to “form” the green background goes away and I still can’t get pass this assignment. See example below.

What am I missing??


#2

Instead of posting screenshots, please copy/paste your code into the forum, so we can view all the code at once.

Also, always post a link to the challenge you are asking about.

To enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make easier to read.

See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.

Note: Backticks are not single quotes.

Thank you.


#3

Hi All,

I have read some of the other posts on this topic and I am still stuck. I keep getting the message that my background color should be green.

Note: When I change the wording in my id element from “form” to “element” I have a green background towards the bottom of the form but I get two of my requirements wrong like in this link here 
 <form id="cat-photo-element" action="/submit-cat-photo" id="cat-photo-form">

 <form id="cat-photo-form" action="/submit-cat-photo" id="cat-photo-form">

I hope this helps


#4

Next time, click, “Ask for help” button in the challenge, it will post your code along with the link.

<form id="cat-photo-element" action="/submit-cat-photo" id="cat-photo-form">

  1. In this you have created two id's, i hope you have done the styling for the id #cat-photo-form, what happens here is, the first id ( id=“cat-photo-element )” you have created doesn’t do anything in your code.

    The green color is caused by this id ( id=“cat-photo-form” ). You just have to remove the
    first id ( cat-photo-element ) for your test to pass.

<form id="cat-photo-form" action="/submit-cat-photo" id="cat-photo-form">
In this, you have created two id’s with same name, you should not create duplicate id’s, therefore you won’t get any result that is intended.

Just follow what i said in point 1 in your test.


#5

I had to step away from my computer.
I’ll log on again when Im stationary.

Thanks for reaching out

Tracey


#6

I took your advice and opened another post using Google the ask for help button. Also, I did put the attribute in my style electrician entry and it still doesn’t work.

Tracey


#7

If you haven’t solved it yet, can you provide the code of what you have tried ?? And also i don’t see another post you have created ( sorry if i am wrong ).


#8

Yes, I solved it. Thanks for checking in with me! :grinning: