I have two divs in a container with a 1px border. I want each div to take up exactly half of the container by width, so I'm trying use CSS3's calc
function to subtract a predetermined pixel value (2px, one border line on each side of the divs) from the overall width (50%). However, for reasons I can't figure out, it's subtracting a percent value from the percent value instead of a pixel for this operation: calc(50% - 2px);
Here is the relevant styling for the divs in the container:
.contained {
border-width: 1px;
width: calc(50% - 2px);
display: inline-block;
}