Transparencies in all browsers using CSS

One of the hardships of any web developer is to obtain consistency in the presentation of content independently of the browser . One of these inconsistencies is the way in which each browser manages the transparencies of images and objects .

Well, if you want to apply transparency to an element, regardless of the browser, you can get it by adding CSS lines to it:

element {

filter : alpha ( opacity = 50 ) ; ] / * internet explorer * /

-khtml-opacity : 0.5 ; / * khtml, previous version of safari * /

-moz-opacity : 0.5 ; / * firefox, mozilla, netscape * /

opacity : 0.5 ; / * safari, chrome, opera * /

-ms-filter : "progid: DXImageTransform.Microsoft.Alpha (Opacity = 50)" ; / * internet explorer 8 – thank you Andres * /

}

Of course, you must remember to modify the " ele ment "by which you are going to adapt, and also know that you can play with the different levels of opacity until you find the one that fits the aspect you want to achieve.