You may use rgba().
div#foo
{
background: rgba(0, 0, 255, 0.3);
}
To make it work in old Internet Explorers use CSS PIE. There are some limitations, but those are handled in a backwards compatible way: the RGB value will be rendered correctly and the opacity will be ignored.