can someone show me the order of background shorthand?

when i use background : no-repeat cover url("image needed"); for some reason the cover is breaking the image and i don't understand why
4 Replies
~MARSMAN~
~MARSMAN~2y ago
background: url("image needed") cover no-repeat;
background: url("image needed") cover no-repeat;
The order is like this: Color, img, size/position, repeat-mode. But better use each property by itself if the background values are a lot to avoid confusion
capt_uhu
capt_uhu2y ago
my understanding is that the order of the properties for the most part doesn't matter. The only requirement is for background-position/background-size to be next to one another.
The <bg-size> value may only be included immediately after <position>, separated with the '/' character, like this: "center/80%".
capt_uhu
capt_uhu2y ago
background - CSS: Cascading Style Sheets | MDN
The background shorthand CSS property sets all background style properties at once, such as color, image, origin and size, or repeat method.
Aozen
Aozen2y ago
thank you both