Rgba does not work in IE9

For some reason, I can't get rgba to work in my CSS using IE9. I tested it using Chrome and it works great. Not sure what happened.

My HTML:

<!doctype html> <html lang="en"> <head> <meta charset="utf-8" /> <title><?php bloginfo('name'); ?> - <?php bloginfo('description'); ?></title> <link href="<?php bloginfo('stylesheet_url'); ?>" rel="stylesheet" type="text/css" /> <link href="http://fonts.googleapis.com/css?family=Raleway:100&v1" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script> </head> <body> <?php wp_nav_menu(); ?> </body> </html> 

My CSS:

 body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym{border:0;font-variant:normal;}sup{vertical-align:text-top;}sub{vertical-align:text-bottom;}input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit;}input,textarea,select{*font-size:100%;}legend{color:#000;} body { font-size: 62.5%; } .menu { font-size: 5em; font-family: 'Raleway', arial, serif; } .menu ul li a { background: rgba(0,0,0,0.5); text-decoration: none; } 
+7
source share
3 answers

Ok, I found out why. It seems that "Compatibility Mode" is turned on, so I turned it off and, voila. I probably accidentally clicked on it when I wanted to click the update button.

+3
source

New standards support in Internet Explorer 9 requires the browser to be in Internet Explorer 9 Standard mode ("IE9 Mode"). The best way to do this is to use the standard DOCTYPE directive and not an X-UA compatible meta tag or an HTTP header. DOCTYPE to call IE9 mode:

 <!DOCTYPE html> background-color: rgba(0,0,0,0.5); 
+13
source

I had problems with background color in ie9. After working through the solutions with google-fu, I realized that I used this border-radius.htc , which broke all the CSS in this particular div. Not only the background color, but also borders and fonts. It was used as follows:

  <style> .ie-rounded-corner{behavior: url(../include/stylesheets/border-radius.htc); } </style> <div class="ie-rounded-corner">Hello World</div> 

I used this border radius view for ie6 / 7/8 to add rounded corners to some elements. This breaks the page in IE9. After removing this class, everything worked as expected in IE9. My rounded corners are now gone in ie6 / 7/8. Perhaps another solution is now needed for legacy IE browsers.

0
source

All Articles