Komejo.com

Essays and short stories by Joe K~

Skip to: Content | Sidebar | Footer

Month: February, 2012

Opacity in decimal, then Hex

11 February, 2012 (17:00) | CSS, Reference, Web Dev | By: Komejo

If you’ve ever set CSS background colors to semi-transparent, you’ve had to make the cross-browser compatible. Here’s the basic code: background: rgba(0, 0, 0, 0.8); filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1); filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#cc0E212A, endColorstr=#cc0E212A); -ms-filter: “progid:DXImageTransform.Microsoft.gradient(startColorstr=#cc0E212A, endColorstr=#cc0E212A)”; The first line is for all the modern browsers, the next three for MSIE varients (IE7, IE8, etc). Important to note – don’t [...]