Your issue is two fold, Kicken is right that you need to combine them into a single attribute, however you should either have an inline CSS proper or have an external CSS file.
Secondly, your opacity needs to be in the proper format. Opacity's default value is '1' which is fully opaque. In order to have a transparent object, you will need to have value from 0.0 (completely hidden) to 1 (no transparency). Most people use the range .45-.6 as it's the most common effects needed.
<head>
<style>
#box1{
background-color: silver;
height: X%;
opacity: .5;
}
</style>
</head>
Something like that will give you an inline CSS sheet so that you're not calling any other files but allows you to have a much cleaner layout and ultimately functional page.