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
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
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%".
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.
thank you both