Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Vertical gradient causing scanlines

Trying to place a top-to-bottom gradient as my background, but for some reason vertical gradients are causing the background to create scanlines.

Image Of Issue

Here’s my stylesheet:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

body{
    background-image: linear-gradient(red, yellow);
    background-size: cover;
    width: 50%;
    padding-left: 25%;
}

>Solution :

Add a min-width and min-height to your body.

body{
    background-image: linear-gradient(red, yellow);
    background-size: cover;
    min-width: 100%;
    min-height: 100vh;
}
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading