Category Archives: position

Overlay screen with transparency achieve by using position: relative and absolute

New trick learned by doing build this layout, have transparent under my two foundation columns. The looking is like this:

transparent wrap under two columns

The div layout is like this:

<div class=”clearfix blueWrap”>
<div class =”orangeWrap”></div>
<!– below two columns is the purple wrap in the picture –>
<div class=”medium-6 columns”></div>
<div class=”medium-6 columns”></div>
</div>

 just few line of css:
  .blueWrap{position:relative;}
  .orangeWrap{
        background-color: rgba(68, 68, 68, 0.47);
	position:absolute;
	top:0;
	left:0;
	width:100%;
	height:100%;
       }
 

then just use the foundation media query to make sure when it was in the big screen don’t display that transparent overlay screeen.

@media only screen and (min-width: 64.063em) {
.orangeWrap {
width:70%;
}

Advertisements