lalitmee
4/2/2018 - 7:34 AM

grid.css

/* CSS Grid layout */

.css-grid {
    margin-top: 25px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    grid-gap: 10px;
    grid-auto-rows: 150px;
    grid-auto-flow: dense;
}

.css-grid img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

.css-grid .big .overlay-holder {
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 0.28571429rem !important;
}

.css-grid .big .details-holder {
    background-color: rgba(0, 0, 0, 0.4);
    font-size: 25px;
    color: white;
    z-index: 1;
    display: inline-flex;
    justify-content: center;
    flex-direction: column;
}

.css-grid .big .details-holder {
    position: absolute;
    top: 0;
    text-align: center;
    left: 0;
    width: 100%;
    height: 96%;
}

.css-grid .horizontal .overlay-holder {
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 0.28571429rem !important;
}

.css-grid .horizontal .details-holder {
    background-color: rgba(0, 0, 0, 0.4);
    font-size: 25px;
    color: white;
    z-index: 1;
    display: inline-flex;
    justify-content: center;
    flex-direction: column;
}

.css-grid .horizontal .details-holder {
    position: absolute;
    top: 0;
    text-align: center;
    left: 0;
    width: 100%;
    height: 96%;
}

.css-grid .vertical .overlay-holder {
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 0.28571429rem !important;
}

.css-grid .vertical .details-holder {
    background-color: rgba(0, 0, 0, 0.4);
    font-size: 25px;
    color: white;
    z-index: 1;
    display: inline-flex;
    justify-content: center;
    flex-direction: column;
}

.css-grid .vertical .details-holder {
    position: absolute;
    top: 0;
    text-align: center;
    left: 0;
    width: 100%;
    height: 96%;
}

.horizontal {
    position: relative;
    width: 100%;
    /* for IE 6 */
}

.horizontal h2 {
    position: absolute;
    top: 0;
    text-align: center;
    left: 0;
    width: 100%;
    height: 100%;
}

.horizontal h2 span {
    color: white;
    font: bold 24px/45px Helvetica, Sans-Serif;
    letter-spacing: -1px;
    background: rgb(0, 0, 0);
    /* fallback color */
    background: rgba(0, 0, 0, 0.7);
    padding: 10px;
}

.vertical {
    position: relative;
    width: 100%;
    /* for IE 6 */
}

.vertical h2 {
    position: absolute;
    top: 0;
    text-align: center;
    left: 0;
    width: 100%;
    height: 100%;
}

.vertical h2 span {
    color: white;
    font: bold 24px/45px Helvetica, Sans-Serif;
    letter-spacing: -1px;
    background: rgb(0, 0, 0);
    /* fallback color */
    background: rgba(0, 0, 0, 0.7);
    padding: 10px;
}

.horizontal {
    max-width: 100%;
    max-height: 100%;
    grid-column: ;
    grid-row: span 1;
}

.vertical {
    max-width: 100%;
    max-height: 100%;
    grid-row: span 2;
    grid-column: span 2;
}

.big {
    max-width: 100%;
    max-height: 100%;
    grid-column: span 2;
    grid-row: span 2;
}