<commit_before>---
layout: article
title:  "How to add a filter with opacity, above a background??"
date:   2015-12-03 14:57:59 +0100
categories: jekyll update
---

I’m not ashamed to tell that I spend so many times to find a solution with this filter, because when I gave an opacity to it, every child elements had the same opacity, so that’s why I would like to right this, even it is simple for lot of people:

###In your html:
![Text editor](/images/filterhtml.png)

###In your CSS:
![Text editor](/images/filtercss.png)


=> So the opacity between the curly braces of rgba color value, is necessary to apply it only to the filter. I hope it will help you.<commit_msg>complete and add gist to an article<commit_after>---
layout: article
title:  "How to add a filter with opacity, above a background??"
date:   2015-12-03 14:57:59 +0100
categories: jekyll update
---

I’m not ashamed to tell that I spend so many times to find a solution with this filter, because when I gave an opacity to it, every child elements had the same opacity, so that’s why I would like to right this, even it is simple for lot of people:

###In my html:

{% gist camilleanelli/2c5c6db8613afa035ef7 %}

###In my CSS:
![Text editor](/images/filtercss.png)

=> If I don’t give a position like __absolute, relative or fixed__, to the element, the z-index property will not work.

=> All elements have the __z-index value of 0__ by default.

=> The element that has __the largest value of z-index__, will be positioned above the others.

=> In the __.filter element__ , I add the value of 0,5 inside curly braces of __rgba value__, because I don't want to apply the opacity to the child elements, like the title for example.


I hope it will help you.
{'fraction_non_alphanumeric': 0.07932831499710481, 'fraction_numerical': 0.02895193977996526, 'mean_word_length': 4.008695652173913, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '654905', 'n_tokens_mistral': 537, 'n_tokens_neox': 494, 'n_words': 277}