Skip to content

Instantly share code, notes, and snippets.

@rodi01
Created February 1, 2012 06:28
Show Gist options
  • Save rodi01/1715487 to your computer and use it in GitHub Desktop.
Save rodi01/1715487 to your computer and use it in GitHub Desktop.
The Right Way to Declare RGBa Colors
/* NON RGBa BROWSERS
------------------------------------------------------ */
#wrap { background-color: #000; }
#footer,
#header { background-color: #ccc; }
.section { color: #fff; }
/* HEADER
------------------------------------------------------ */
#header { background-color: rgba(204,204,204,.8); }
#header ul { float: right; }
#header li {
float: left;
margin-left: 1em;
}
#header li:first-child { margin-left: 0; }
/* WRAP
------------------------------------------------------ */
#wrap {
width: 960px;
margin: 0 auto;
background-color: (0,0,0,.7);
}
.section {
padding: 1em;
color: rgba(255,255,255,.9);
}
/* NON RGBa BROWSERS
------------------------------------------------------ */
#header { border: 1px solid #000; }
/* HEADER
------------------------------------------------------ */
#header { border-color: rgba(0,0,0,.7); }
/* HEADER
------------------------------------------------------ */
#header {
background-color: #ccc;
background-color: rgba(204,204,204,.8);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment