Viewing 23 posts - 1 through 23 (of 23 total)
  • Author
    Posts
  • #354389

    How can I make the background of a color section gradient from dark to light . I.e. a light gray to white. I tried using the gradient backgrounds in the styling section but thats not working. Currently using a huge image but that doesnt seem efficient.

    #355041

    Hey glozemedia!

    Please edit your Color Section elements and give them a unique ID ( http://kriesi.at/documentation/enfold/wp-content/uploads/sites/2/2013/12/color-section-ID.png ) and then add following code to Quick CSS in Enfold theme options under General Styling tab

    #your-custom-id {
    background: -webkit-linear-gradient(grey, white);
    background: -o-linear-gradient(grey, white);
    background: -moz-linear-gradient(grey, white);
    background: linear-gradient(grey, white);
    }

    Best regards,
    Yigit

    #355419

    This works great! How can i make the grey lighter?

    #355689

    Hey!

    Try this.

    #your-custom-id {
    background: -webkit-linear-gradient(#999999, white);
    background: -o-linear-gradient(#999999, white);
    background: -moz-linear-gradient(#999999, white);
    background: linear-gradient(#999999, white);
    }

    Best regards,
    Elliott

    #355755

    can we add multiple items to the DEVELOPER ID, i.e. an anchor link and the css class

    How would i add that? schedule, your-custom-id?

    #356304

    Hey!

    To link to an element all it needs is an ID and then you can do this.

    <a href = "#id">Click me</a>
    

    To add a CSS class see here, http://kriesi.at/documentation/enfold/turn-on-custom-css-field-for-all-alb-elements/.

    Best regards,
    Elliott

    #357284
    This reply has been marked as private.
    #357848

    Hi!

    Are you sure you added the “whitetogray” class in the “Custom CSS” field of the color section? I didn’t see that class added to any of the color sections in your source code.

    Also, to target an element via CSS you use the period instead of pound like so.

    .whitetogray {
    background: -webkit-linear-gradient(white, #dedede);
    background: -o-linear-gradient(white, #dedede);
    background: -moz-linear-gradient(white, #dedede);
    background: linear-gradient(white, #dedede);
    }

    Cheers!
    Elliott

    #567254

    Hi everyone,
    if I add it like Yigit said (or the codes behind), I can see no gradient. All what I see is a white background color instead of my regular color. I have set a user defined background-picture. If I remove that picture, I can see the gradient behavior as expected, but I need both -> picture and gradient.

    What did I wrong or what can I do?

    Thanks a lot
    Kai

    • This reply was modified 8 years, 10 months ago by Kai.
    #567611

    Hi @Kai,

    Could you provide us with a link to the site in question so that we can take a closer look please?

    Regards,
    Rikard

    #568906

    Here is a private contant:

    #568916

    Hi!

    Please add following code to Quick CSS instead

    .page-id-54 #av_section_1 .av-section-color-overlay {
        background: -webkit-linear-gradient(red, white);
        background: -o-linear-gradient(red, white);
        background: -moz-linear-gradient(red, white);
        background: linear-gradient(red, white);
    }

    Best regards,
    Yigit

    #569312

    Hello Yigit,
    that works partially. I see a gradient from dark pink (instead of red) to light pink (Instead of white) now.
    Best regards
    Kai

    #569778

    Hey Kai,

    I think you will have to experiment with the colours in the code Yigit gave you until you get the result you are looking for, you can see all CSS colour names here: http://www.w3schools.com/cssref/css_colornames.asp, or you can use a custom hex code for the exact colour you are looking for.

    Thanks,
    Rikard

    #569790

    Hello Rikard,

    if I understand it correct is the main problem, that the area of the user defined background-picture section or the section “av_section_1” (which should be the same as I expect), than is the height of the section smaller than the height which the gradient set. That could explain, why I see a gradient from dark pink (instead of red) to light pink (Instead of white) now, because these colours are between red and white. Playing with colours can’t give me the correct result.

    What do you think?
    Thanks,
    Kai
    PS.: if I use “container” instead of Yigits “av-section-color-overlay”, than I see the correct gradient behaviour, but that removes the user defined background picture.

    • This reply was modified 8 years, 10 months ago by Kai.
    #570059

    Ok, I found a solution by using Firebug and the result was as wished. As I wrote above, the “height” of the gradient is bigger than the “visible-height”.

    This is the code without gradient as used and without any changes by using Quick-CSS or something like this:

    background-repeat: no-repeat;
    background-image: url(LINK-TO-IMAGE);
    background-attachment: fixed;
    background-position: center center;   

    This is the code with gradient and a result as wished (here only for the Firefox-Browser):

    background-repeat: no-repeat;
    background-image: url(LINK-TO-IMAGE), -moz-linear-gradient(blue, white);
    background-attachment: fixed;
    background-position: center center;

    I changed the code directly at the page (by using Firebug).

    What is the best way to explain this Enfold? How should I use Quick-CSS or is there any recommendation of your side?

    Thanks
    Kai

    • This reply was modified 8 years, 10 months ago by Kai.
    #570070

    Hi!

    The code i posted basically adds gradient background to your color section overlay and it is set to 0.2 opacity. That is why it is showing up pink instead of red.
    Can you please post a screenshot from Firebug where you make changes so we can see correct selector?

    Regards,
    Yigit

    #570103

    I changed at “av_section_1”. Here are 2 screenshots posted by Privat Content

    #570128

    Hi!

    Please edit your Color Section element and give it a unique ID – http://kriesi.at/documentation/enfold/wp-content/uploads/sites/2/2013/12/color-section-ID.png and then add your code as following

    #your-unique-id { background-repeat: no-repeat;
    background-image: url(LINK-TO-IMAGE), -moz-linear-gradient(blue, white);
    background-image: url(LINK-TO-IMAGE), -webkit-linear-gradient(blue, white);
    background-image: url(LINK-TO-IMAGE), linear-gradient(blue, white);
    background-attachment: fixed;
    background-position: center center; 
    }

    Cheers!
    Yigit

    #795165

    Great post, thank you!

    Is there a way to make this gradient go from left to right, not from top to bottom?

    #795279

    Hi,

    This tool might be helpful generating gradient colors: http://www.colorzilla.com/gradient-editor/

    Best regards,
    Nikko

    #795726

    Awesome! Thank you!

    #795939

    Hi,

    Glad @Nikko could help! Let us know if you have any other questions or issues :)

    Best regards,
    Yigit

Viewing 23 posts - 1 through 23 (of 23 total)
  • The topic ‘Make background gradient’ is closed to new replies.