Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

rgba not working in IE9

Tags:

css

For some reason, I can't get rgba working within my CSS using IE9. I've tested it using Chrome, and it works fine. Not sure what's wrong.

My HTML is:

<!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 is:

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;
}
like image 685
cvandal Avatar asked Jun 29 '11 03:06

cvandal


1 Answers

The new standards support in Internet Explorer 9 requires the browser to be in Internet Explorer 9 Standards mode (“IE9 mode”). The best way to do this is to use a standards !DOCTYPE directive and no X-UA-Compatible meta tag or HTTP header. The !DOCTYPE to invoke IE9 mode is the following:

<!DOCTYPE html>

background-color: rgba(0,0,0,0.5);
like image 137
viclm Avatar answered Sep 23 '22 09:09

viclm