Do not make the entire element translucent (as this will affect all descendant elements). Use alpha on the background color.
And you can also make borders translucent (without using a shadow).
#nl-login{ width:400px; height:250px; background-color:rgba(240,240,240,0.3); margin:40px auto; border:1px solid; border-color:rgba(240,240,240,0.5) rgba(0,0,0,0.5) rgba(0,0,0,0.5) rgba(240,240,240,0.5) ; }
Full example
* { margin: 0; padding: 0; } html { width: 100%; height: 100%; } body { background-color: #3E4C79; width: 100%; height: 100%; } #nl-login { width: 400px; height: 250px; background-color: rgba(240, 240, 240, 0.3); margin: 40px auto; border: 1px solid; border-color: rgba(240, 240, 240, 0.5) rgba(0, 0, 0, 0.5) rgba(0, 0, 0, 0.5) rgba(240, 240, 240, 0.5); }
<div id="nl-login"> </div>
source share