New Landing How can we help? Themeforest Theme Support Flexform apply gradient background to text block

Viewing 13 posts - 1 through 13 (of 13 total)
  • Posted in: Flexform
  • #165501
    Carol
    Member
    Post count: 73

    I would like to apply a gradient background to a text block.
    In searching the forums, I see two solutions: one involving adding CSS and the other uploading an image, but I do not see where to insert either.

    Sample code from a color picker would be (pasted below) – where and how to place?:

    <style>
    body {background-color:rgb(255,255,255); /* Old browsers */
    background: -moz-linear-gradient(left, rgba(255,255,255,1) 1%, rgba(209,209,209,1) 1%, rgba(254,254,254,1) 1%, rgba(254,254,254,1) 43%, rgba(254,254,254,1) 81%, rgba(209,209,209,1) 100%, rgba(209,209,209,1) 100%, rgba(226,226,226,1) 100%, rgba(219,219,219,1) 100%, rgba(209,209,209,1) 100%, rgba(226,226,226,1) 100%, rgba(209,209,209,1) 100%, rgba(226,226,226,1) 101%, rgba(210,205,199,1) 101%); /* FF3.6+ */
    background: -webkit-gradient(linear, left top, right top, color-stop(1%,rgba(255,255,255,1)), color-stop(1%,rgba(209,209,209,1)), color-stop(1%,rgba(254,254,254,1)), color-stop(43%,rgba(254,254,254,1)), color-stop(81%,rgba(254,254,254,1)), color-stop(100%,rgba(209,209,209,1)), color-stop(100%,rgba(209,209,209,1)), color-stop(100%,rgba(226,226,226,1)), color-stop(100%,rgba(219,219,219,1)), color-stop(100%,rgba(209,209,209,1)), color-stop(100%,rgba(226,226,226,1)), color-stop(100%,rgba(209,209,209,1)), color-stop(101%,rgba(226,226,226,1)), color-stop(101%,rgba(210,205,199,1))); /* Chrome,Safari4+ */
    background: -webkit-linear-gradient(left, rgba(255,255,255,1) 1%,rgba(209,209,209,1) 1%,rgba(254,254,254,1) 1%,rgba(254,254,254,1) 43%,rgba(254,254,254,1) 81%,rgba(209,209,209,1) 100%,rgba(209,209,209,1) 100%,rgba(226,226,226,1) 100%,rgba(219,219,219,1) 100%,rgba(209,209,209,1) 100%,rgba(226,226,226,1) 100%,rgba(209,209,209,1) 100%,rgba(226,226,226,1) 101%,rgba(210,205,199,1) 101%); /* Chrome10+,Safari5.1+ */
    background: -o-linear-gradient(left, rgba(255,255,255,1) 1%,rgba(209,209,209,1) 1%,rgba(254,254,254,1) 1%,rgba(254,254,254,1) 43%,rgba(254,254,254,1) 81%,rgba(209,209,209,1) 100%,rgba(209,209,209,1) 100%,rgba(226,226,226,1) 100%,rgba(219,219,219,1) 100%,rgba(209,209,209,1) 100%,rgba(226,226,226,1) 100%,rgba(209,209,209,1) 100%,rgba(226,226,226,1) 101%,rgba(210,205,199,1) 101%); /* Opera 11.10+ */
    background: -ms-linear-gradient(left, rgba(255,255,255,1) 1%,rgba(209,209,209,1) 1%,rgba(254,254,254,1) 1%,rgba(254,254,254,1) 43%,rgba(254,254,254,1) 81%,rgba(209,209,209,1) 100%,rgba(209,209,209,1) 100%,rgba(226,226,226,1) 100%,rgba(219,219,219,1) 100%,rgba(209,209,209,1) 100%,rgba(226,226,226,1) 100%,rgba(209,209,209,1) 100%,rgba(226,226,226,1) 101%,rgba(210,205,199,1) 101%); /* IE10+ */
    background: linear-gradient(to right, rgba(255,255,255,1) 1%,rgba(209,209,209,1) 1%,rgba(254,254,254,1) 1%,rgba(254,254,254,1) 43%,rgba(254,254,254,1) 81%,rgba(209,209,209,1) 100%,rgba(209,209,209,1) 100%,rgba(226,226,226,1) 100%,rgba(219,219,219,1) 100%,rgba(209,209,209,1) 100%,rgba(226,226,226,1) 100%,rgba(209,209,209,1) 100%,rgba(226,226,226,1) 101%,rgba(210,205,199,1) 101%); /* W3C */
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=’#ffffff’, endColorstr=’#d2cdc7′,GradientType=1 ); /* IE6-9 */}
    </style>

    #165530
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please remove style tags and insert code at Admin -> Theme Options -> General Options -> Custom CSS.

    Thanks
    Mohammad

    #165648
    Carol
    Member
    Post count: 73
    This reply has been marked as private.
    #165651
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Hi

    Give the text box an extra class, then replace ‘body’ with the extra class

    – Kyle

    #165658
    Carol
    Member
    Post count: 73
    This reply has been marked as private.
    #165665
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    And your link..?

    – Kyle

    #165666
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Like Kyle suggested add an extra class first like in the image.
    https://www.dropbox.com/s/palkc668ad4uqhv/text_block_extra_class.png?dl=0

    Then you the custom css option add the following css.

    .bc-style{
    
    /*Add here you css for the background*/
    
    }

    -Rui

    #165674
    Carol
    Member
    Post count: 73
    This reply has been marked as private.
    #165677
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Did you check my reply? Now you just need to place your css inside that rule and place everything in the custom css.

    -Rui

    #165678
    Carol
    Member
    Post count: 73
    This reply has been marked as private.
    #165683
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779
    This reply has been marked as private.
    #166074
    Carol
    Member
    Post count: 73
    This reply has been marked as private.
    #166103
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Great thanks to Rui.
    Mohammad

Viewing 13 posts - 1 through 13 (of 13 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register