Hello i want to add some CSS3 filters on a background image but the effects take place on the text too not just the background image.

Here is the css code

  <div style="color:whitesmoke;
                background-image:url(wall_icons/uploadMedia.png); 
  background-size:contain;-webkit-filter:grayscale(1.7);
  filter: brightness(0.2);
-webkit-filter: brightness(0.2);
-moz-filter: brightness(0.2);
-o-filter: brightness(0.2);
-ms-filter: brightness(0.2);
   background-repeat:no-repeat"> <small style="font-size: 3vmin;">Text.Text.Text.Text.Text.Text.</small> </b> </div> 
Member Avatar for diafol

Not sure if you realise this simon, but you are setting the css on the DIV which contains the text, so of course it will be affected. What were you expecting?

http://stackoverflow.com/a/20039965

Look at the content:before method and see the codepen example.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.