{"id":2598,"date":"2017-09-06T13:56:19","date_gmt":"2017-09-06T03:56:19","guid":{"rendered":"http:\/\/benryan.com.au\/?p=2598"},"modified":"2017-09-07T21:38:49","modified_gmt":"2017-09-07T11:38:49","slug":"gradient-overlay","status":"publish","type":"post","link":"https:\/\/benryan.com.au\/gradient-overlay\/","title":{"rendered":"Gradient Overlay for Full Width Parallax Featured Image"},"content":{"rendered":"
After writing the how-to article on the Full Width Parallax Featured Image<\/a>, theres one question I get asked a lot. How do I change the transparent overlay to a gradient overlay?<\/strong> The answer is actually quite easy. The hardest part is choosing the colour or colours, and opacity.<\/p>\n<\/div> If you haven’t already, apply the full width parallax featured images to you X Theme or Pro Theme. It’s a few very simple steps to follow here, or download the X and Pro Child Themes below with it pre-installed.<\/p>\n<\/div> Download Child Themes<\/a><\/span><\/p>\n<\/div> Now we’ve got that out of the way, lets get down to business.<\/p>\n To change the transparent overlay on the full width parallax featured image to a gradient overlay, locate the below CSS:<\/p>\n Simply choose a new colour. For example, change rgba(96, 124, 138, 0.85) to rgba(139, 195, 74, 0.85).<\/p>\n The 4th number in the RGBA sequence is relating to the transparency. 0 being completely transparent, and 1 being a solid colour. Play with the transparency to see what looks good on your site.<\/p>\n New gradient overlay CSS would look something like:<\/p>\n Simply choose the colours you’d like to use in your gradient. This part can be difficult as the options are endless<\/em>. If you need some gradient inspiration, check out UI Gradients<\/a>. Also W3 Schools<\/a> has a great breakdown of everything to do with gradient overlay CSS (linear and radial).<\/p>\n Now change<\/p>\n background: rgba(96, 124, 138, 0.85);<\/p>\n to<\/p>\n background: -webkit-linear-gradient(to bottom, rgba(96, 124, 138, 0.85), rgba(139, 195, 74, 0.85)); The linear gradient overlay CSS should look like this:<\/p>\n Very simply delete the below code from the CSS.<\/p>\n A linear gradient overlay, or even a transparent overlay isn’t a necessicity. It just looks awesome.<\/p>\n I like to imagine the gradient overlay as the following – Imagine your looking at a picture perfect landscape through a a pane of coloured glass. Still stunning while adding a new dimension to that image. <\/p>\n The linear gradient has many uses in Web Design. <\/p>\n Download Child Themes<\/a><\/span><\/p>\n<\/div> Why would you use one over the other? Absolutely no reason at all except your own personal preference, and what suits your website\/brand.<\/p>\n<\/div> The single colour overlay is what I use on this site (benryan.com.au<\/a>) and also what I have included in the Full Width Parallax Featured Image<\/a>. It’s the style that best suits my site and simple to add.<\/p>\n For example, below is the CSS and an example of how it looks. Hover over the below image to see the original image:<\/p>\n The linear gradient overlay adds yet another layer to a featured image or background. Rather then a simple flat colour, you can combine 2, 3, 4 or even more colours to created the style your looking form.<\/p>\n Need more colour inspiration? There is some beautiful examples here<\/a>.<\/p>\n For example, below is the CSS and an example of how it looks. Hover over the below image to see the original image:<\/p>\n By now, you’ve downloaded your free copy of the X and Pro Child Themes pre installed with the full width parallax featured image. You also have the know-how on changing the transparent overlay CSS or even going for a linear gradient overlay.<\/p>\n In the comments below, be sure to share a link to your site so we get to see what you’ve created.<\/p>\n Here are a few more posts you might be interested in or if you prefer, feel free to check out my ongoing support packages<\/a> \ud83d\ude42<\/p>\n<\/div>How to add a gradient overlay to the full-width parallax featured image?<\/span><\/h2>
\r\n.featured-image:after {\r\nbackground: rgba(96, 124, 138, 0.85);\r\n}\r\n<\/pre>\n<\/div>
Change transparent colour <\/span><\/h3>
\r\n.featured-image:after {\r\nbackground: rgba(139, 195, 74, 0.85);\r\n}\r\n<\/pre>\n<\/div>
Change to gradient overlay <\/span><\/h3>
\nbackground: linear-gradient(to bottom, rgba(96, 124, 138, 0.85), rgba(139, 195, 74, 0.85));<\/p>\n\r\n.featured-image:after {\r\nbackground: -webkit-linear-gradient(to bottom, rgba(96, 124, 138, 0.85), rgba(139, 195, 74, 0.85)); \/* Chrome 10-25, Safari 5.1-6 *\/\r\nbackground: linear-gradient(to bottom, rgba(96, 124, 138, 0.85), rgba(139, 195, 74, 0.85)); \/* W3C, IE 10+\/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ *\/\r\n}\r\n<\/pre>\n<\/div>
Remove the transparent overlay<\/span><\/h3>
\r\n.featured-image:after {\r\nbackground: rgba(96, 124, 138, 0.85);\r\n}\r\n<\/pre>\n<\/div>
What is a linear gradient overlay and why do I need it?<\/span><\/h2>
\n
There are 2 main types of background overlays – Single colour and linear gradient<\/span><\/h3>
Single Colour Overlay<\/span><\/h4>
\r\n.featured-image:after {\r\nbackground: rgba(96, 124, 138, 0.85);\r\n}\r\n<\/pre>\n<\/div><\/div><\/div>
Linear Gradient Overlay<\/span><\/h4>
\r\n.featured-image:after {\r\nbackground: linear-gradient(to bottom, rgb(96, 124, 138), #67b26f);\r\n}\r\n<\/pre>\n<\/div><\/div><\/div>
What do I do now?<\/span><\/h3>
Gradient Overlay for Full Width Parallax Featured Image<\/h3>6 September 2017<\/span><\/div><\/div><\/article><\/a>
Metorik – Analytics, Reports, and Insights for WooCommerce<\/h3>20 December 2016<\/span><\/div><\/div><\/article><\/a>
Page Speed: Are Slow Loading Pages Affecting Your Revenue?<\/h3>13 October 2016<\/span><\/div><\/div><\/article><\/a><\/div>
Image Optimisation<\/h3>22 April 2016<\/span><\/div><\/div><\/article><\/a>
How to use Jetpack and CloudFlare on a WordPress site<\/h3>12 April 2016<\/span><\/div><\/div><\/article><\/a>
Full Width Parallax Featured Images for the X Theme or Pro Theme<\/h3>10 April 2016<\/span><\/div><\/div><\/article><\/a><\/div>