1

I'm trying to use a CSS gradient code within a container that has a border and 30px margin, but this code is filling the margin space too. I want the margin to be left out of the gradient.

I tried adding 'margin: 0;' and 'margin: 0!important', but it's not working. Any ideas? Thanks.

    .bg-gradient-row {
background: rgba(255,255,255,1);
background: -moz-linear-gradient(top, rgba(255,255,255,1) 0%, rgba(44,245,44,1) 100%);
background: -webkit-gradient(left top, left bottom, color-stop(0%, rgba(255,255,255,1)), color-stop(100%, rgba(44,245,44,1)));
background: -webkit-linear-gradient(top, rgba(255,255,255,1) 0%, rgba(44,245,44,1) 100%);
background: -o-linear-gradient(top, rgba(255,255,255,1) 0%, rgba(44,245,44,1) 100%);
background: -ms-linear-gradient(top, rgba(255,255,255,1) 0%, rgba(44,245,44,1) 100%);
background: linear-gradient(to bottom, rgba(255,255,255,1) 0%, rgba(44,245,44,1) 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#2cf52c', GradientType=0 );
}
  • can you paste your html and css please? not only the gradient css. thx! – funkysoul Jan 14 '17 at 12:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.