Skyline Beta Project--Issue with "background" property

.bb1a {
  background: linear-gradient(var(--building-color1), 
  var(--window-color1));
  width: 70%;
  height: 10%;
  background-color: var(--building-color1);
}

*the code seems to be working fine, or at least the window is showing the gradient, but I keep getting informed that I should “add a background property”

Hi @MrYub !

Welcome to the forum!

Please provide the link of the lesson you are working on so we can see the issue better.

I’ve edited your post for readability. When you 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 it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).

Hello @MrYub

I don’t know what is the task but for now there is already something that should attract your attention into your CSS definition. You use the super propriety background which include then background color. You must know it as you used the linear-gradient() function. Now, look the last property you use in your bb1a class. :wink:

Yeah I figured it out. Trying to mark this as solved, but unsure how. Thank you, by the way! :slight_smile:

edit: the code seemed to work when the linear-gradient is the last function in the list… not sure why, but this seemed to solve my issue.

1 Like

No problem @MrYub! When you say the last function in the list you mean the last value in the linear-gradient() function?

Ah, sorry… I meant the last in the list of styles in the .bb1a class selector.

Ok! Honestly, I don’t have a sure answer, maybe because you put it after you define the size, not sure

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