Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Mozilla/Gecko handling background gradients different than webkit

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #168861
    kpry
    Participant

    I built a site using bootstrap, and applied a background gradient to the body tag.

    Looks fine on webkit (chrome and safari – desktop and mobile) but not on Mozilla/Gecko. Instead of the gradient being contained to the size specified, it expands to the total height of the page.

    Example: healthystartkids.ca

    The yellow background gradient is different in chrome vs firefox?

    My css has vendor prefixes on it.

    body {
       font-size: 16px;font-weight: 400;
       font-family: 'Open Sans', Helvetica, sans-serif;
       min-width: 970px;
       background-image: -webkit-gradient(
       linear,
       left bottom,
       left top,
       color-stop(0.49, #FFFFFF),
       color-stop(1, ##ECB922)
       );
       background-image: -o-linear-gradient(top, #FFFFFF 49%, #f1c40f 100%);
       background-image: -moz-linear-gradient(top, #FFFFFF 49%, #f1c40f 100%);
       background-image: -webkit-linear-gradient(top, #FFFFFF 49%, #f1c40f 100%);
       background-image: -ms-linear-gradient(top, #FFFFFF 49%, #f1c40f 100%);
       background-image: linear-gradient(to top, #FFFFFF 49%, #f1c40f 100%);
       height: 1000px;
       background-repeat: no-repeat;
    }
    
    #169362
    ElijahFowler
    Participant

    Remove height: 1000px; from the body, that should fix the issue.

    Good Luck.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘CSS’ is closed to new topics and replies.