• Home
  • Billiards
  • Classic ASP
  • Browse Blog
    • Halifax
    • Internet
    • Internet Marketing
    • Programming
    • SEO
    • sitemap
    • Skateboarding
    • technology
      • Automation
    • travel
    • Web Development
    • Web Hosting
    • Website Management
    • wedding
  • Subscribe via RSS

CSS Opacity for All Browsers Cross Browser Compatible

May 3rd, 2009  |  Published in technology, Web Development  |  2 Comments




If you are looking for a Cross Browser Compatible CSS Opacity code, you need look no further. The following provides 100% opacity (which is the same as 0% transparency.)

1
2
3
4
5
6
7
8
9
10
Body {
 
...your body css...
 
-moz-opacity: 1.0 !important;
-webkit-opacity: 1.0!important;
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)" !important;
filter: alpha(opacity=100) !important;
opacity: 1.0 !important;
}

Body { ...your body css... -moz-opacity: 1.0 !important; -webkit-opacity: 1.0!important; -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)" !important; filter: alpha(opacity=100) !important; opacity: 1.0 !important; }

The key is ensuring that the order of the opacity entries are kept in this format.

The -webkit- opacity handles chrome, the -mox- handles FF, Netscape, Mozilla, the -ms- handles older IE versions, like 5 and 6.

  • best css opacity for all browsers.
  • opacity css cross browser?
  • how to use css opacity
  • what is css opacity
  • cross browser opacity css
  • opacity css for IE6, IE5

Responses

Feed Trackback Address
  1. Diego says:

    April 24th, 2012 at 10:50 pm (#)

    Does this includes Opera?

  2. Joshua Davis says:

    July 30th, 2012 at 11:07 pm (#)

    Just a helpful hint since this comes up pretty high when searching for “webkit-opacity”, the vendor prefix is no longer needed. It’s been removed from most major browsers since 2004: https://developer.mozilla.org/en/CSS/opacity#Browser_compatibility. I’d suggest keeping the ms-filter one in there since there’s plenty of people with older version of IE, but the other ones will just bloat your CSS.

Leave a Response

Tags

1and1 adsense asp caribbean classic asp crowdsourcing CTR cuba Cueva de Pirata customer service database dominican republic forum management godaddy google Halifax hosting hotel ideagora Internet Linux MySQL objWmiService outsourcing php Pirates Cave plugin scripting scripts SEO Skateboarding sql travel Varadero vbs vbscript web browser web development wedding What is Crowdsourcing? wikipedia windows windows scripting winmgmts xp

Pages

  • About Robar’s Pages
    • Privacy Policy for robarspages.ca
  • Classic ASP Programming and Development
  • Gran Bahia Principe Wedding
  • YouTube Extension Plugins for WordPress

Categories

  • Automation
  • Halifax
  • Internet
  • Internet Marketing
  • Programming
  • SEO
  • sitemap
  • Skateboarding
  • technology
  • travel
  • Web Development
  • Web Hosting
  • Website Management
  • wedding

Recent Posts

  • HTTP_X_EAC_REQUEST
  • eZooms Bot User Agent
  • SQL Full Outer Join Three Tables
  • Classic ASP Data Caching for Performance
  • Comparing OLE DB and ODBC Connections

Recent Comments

  • AP on 1and1 Corporate Headquarters Phone Number
  • AJ on 1and1 Corporate Headquarters Phone Number
  • cordova on 1and1 Corporate Headquarters Phone Number
  • mike on 1and1 Corporate Headquarters Phone Number
  • David on Regex MM/YYYY Regular Expression for Credit Card Expiration Date
©2023 Robar's Pages
Sitemap and Table Of Contents