How to align a div layer?

The situation is this: there is a background and it is available in 6 div-blocks(.box 320), I want to make translucent frame each block, so I decided to make a number of div layers(.box-330) under the main images using color and transparency, but there is a problem with alignment.
make skins and css, what would it be clear and understandable.
Thanks in advance!
Block picture
.box320 {
z-index: 1;
width: 304px;
height: 190px;
padding: 8px;
/* background: #c0c0c0;*/
float: left;
position: relative;
overflow: visible;
float: left;
line-height:0; /

Block frame
.box330 {
z-index: 1;
width: 308px;
height: 194px;
padding: 8px;
background: #00FFFF;
float: left;

b3a20c5521af4dc0910f161227a7eada.PNG
July 9th 19 at 14:06
1 answer
July 9th 19 at 14:08
and what hinders simply to make a translucent border? and why is z-index?
Conceived that PI you hover over a block, it becomes lighter, there is two img original and zatonirovany, z-index for proper layering, completely in css it looks like this:

.box320 {
z-index: 1;
width: 304px;
height: 190px;
padding: 8px;
/* background: #c0c0c0;*/
float: left;
position: relative;
overflow: visible;
float: left;
line-height:0; /* no space after the image */
}

.button_tone .button_orig {
width: 304px;
height: 190px;
float: left;

}

.button_orig {
z-index: 1;
position: relative;
border: 10px solid rgba(255, 0, 0, .5);
}

.button_tone {
z-index: 2;
position: relative;
top: -190px;
left: 0px;
float: left;
border: 10px solid rgba(255, 0, 0, .5);
/*clear*/

I added border: 10px solid rgba(255, 0, 0, .5); and I still everything looks offset, how to fix it?

ae52b0d3f12649878ffaa54b486e72d9.PNG - vance66 commented on July 9th 19 at 14:11
you understand the block model? can for fun, to register your units - box-sizing: border-box - Angelica.Bradtke commented on July 9th 19 at 14:14
and why don't you do instead of extra images, dark background block images + opacity images, it is then the idea will zatamnenie, and hover just to remove the opacity - Angelica.Bradtke commented on July 9th 19 at 14:17
: I am not fully understand, in fact, learn - vance66 commented on July 9th 19 at 14:20

Find more questions by tags HTMLCSS