CSS Exam P2 - Transition Button

I hope it is okay I am asking a question about the exam on CSS. The requirement is as follows:

Complete the CSS rule for the .button class so that when a user hovers over the button its text color, background color, and border color only transition over a duration of 1.5 seconds.

Below is the original code I am given:

.button {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    display: block;
    margin: auto;
    border-radius: 5px;
    border: thick solid #005C46;
    width: 300px;
    height: 100px;
    background-color: #8FC9A3;
    color: #005C46;
    font-size: 40px;
  }

.button:hover {
  color: #8FC9A3;
  background-color: #005C46;
  border: thick solid #8FC9A3;
}

I successfully get the code to work. I simply did the following change:

.button:hover {
  color: #8FC9A3;
  background-color: #005C46;
  border: thick solid #8FC9A3;
  transition: 1.5s;
}

I also tried: transition-duration: 1.5s incase it didn’t want the equally effective short hand and wanted something more specific. Of course, both work, I hover over the button and everything transitions over a span of 1.5 seconds. Yet, I keep getting the error message asking me if I put in a transition time of 1.5 seconds.

I have even done the stupid of placing transition: 1.5s under .button, though that causes a delay in the button loading visually when I run the code and is not right as what I originally did is correct, unless I am completely blind.

Is the test question glitched, or am I missing something else entierly?

I’m sorry but we cannot help out with exam questions.

That’s funny as I found assistance for the question on the HTML coding the article Here As that one has been a bug for me as well, I figured I could ask about this one.

I honestly don’t want to be given the answer just a clue about what I could be missing. Personally I feel that the question is exceptinally vauge and difficult to interpret to meet the exact desired effect. Part of learning is learning from mistakes which is particularly difficult in this case.

There are some users who may be relatively new to the forums and do not know if questions pertain to exams. This may be because they do not have access to the exams or have never taken them. However, we are not supposed to provide answers (or really ask for them) per the Community Guidelines.

However, I have noticed people frequently posting questions about the exams (and giving answers), and perhaps we can see if we can find a solution to clarify when users require clarification rather than an answer.

I do see why it’s not accepting your CSS; perhaps switching the placement of one word will help nudge you in the right direction.

Instead:

Complete the CSS rule for the .button class so that when a user hovers over the button, only its text color, background color, and border color transition over a duration of 1.5 seconds.

1 Like

This post was flagged by the community and is temporarily hidden.