Understanding CSS z-index && positioning.

This commit is contained in:
2017-02-05 23:14:00 -08:00
commit b94d8d551e
2 changed files with 97 additions and 0 deletions

70
z-index/main.css Normal file
View File

@@ -0,0 +1,70 @@
/**
* @file
* This is style sheet for the index.html@z-index.
*
* Understanding CSS z-index && positioning.
* Stacking without z-index.
* This file contains set of rules for positioning css elements.
*/
*,
*:before,
*:after {
margin: 0;
padding: 0;
box-sizing: border-box;
}
.bold {
font-weight: bold;
font: 12px Arial;
}
#normdiv {
height: 70px;
border: 1px dashed #999966;
background-color: #e8e230;
margin: 0px 50px 0px 50px;
text-align: center;
}
#reldiv1 {
opacity: 0.7;
height: 100px;
position: relative;
top: 30px;
border: 1px dashed #669966;
background-color: #30e8bd;
margin: 0px 50px 0px 50px;
text-align: center;
}
#reldiv2 {
opacity: 0.7;
height: 100px;
position: relative;
top: 15px;
left: 20px;
border: 1px dashed #669966;
background-color: #30e8bd;
margin: 0px 50px 0px 50px;
text-align: center;
}
#absdiv1 {
opacity: 0.7;
position: absolute;
width: 150px;
height: 350px;
top: 10px;
left: 10px;
border: 1px dashed #990000;
background-color: #e86830;
text-align: center;
}
#absdiv2 {
opacity: 0.7;
position: absolute;
width: 150px;
height: 350px;
top: 10px;
right: 10px;
border: 1px dashed #990000;
background-color: #e86830;
text-align: center;
}