HTML CSS examples for CSS Layout:Parent Container
Apply filter on container div
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .artist_wrapper {<!--from www . j a va 2s . co m--> width:201px; height:301px; } .artist_photo { background-image:url('http://www.java2s.com/style/demo/Google-Chrome.png'); -webkit-filter:grayscale(2); width:100%; height:100%; } .artist_name { background-color:Chartreuse; } </style> </head> <body> <div class="artist_wrapper"> <div class="artist_name"> Some text </div> <div class="artist_photo"></div> </div> </body> </html>