1

I'm using firefox 85 on ubuntu. I'm not sure what's happening I can't seem to get linear-gradient to show up! CanIUse says it's fine and I've combed through stackoverflow and other websites and none of the variations work. I even simplified it to :

background: linear-gradient(to top, red, yellow);

I think this issue could be local but I have no idea where how to fix it. Please help!

my code:

body {
  position: absolute;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template: repeat(25, 1fr) / 1fr 3fr;
  background: linear-gradient(180deg, #FFFFFF 0%, rgba(255, 255, 255, 0) 100%), linear-gradient(180deg, rgba(135, 129, 129, 0) 0%, #878181 100%);
}
Temani Afif
  • 245,468
  • 26
  • 309
  • 415
  • If you have a !doctype html at the head of your document it seems the background isn't shown. If you remove that and plunge straight in with html, head etc it shows the background image. I can't explain that (particularly since the body appears to have width and height according to dev tools inspection). – A Haworth Feb 03 '21 at 17:48
  • min-height:100% to html element – Temani Afif Feb 03 '21 at 19:29

1 Answers1

0

So I just tried applying the property to one of the divs and it works now! It seems that you can't apply this directly to the body. If you know why and want to share the knowledge please lmk or I'll research later and post.