.your-div{ background-color: linear-gradient(45deg, #fff, #000); min-height: 500px; // to example min-width: 500px; // to example }