samedi 18 juin 2016

Min-height doesn't show me scrollbar

I am stuck with my code for few hours. I am trying to extend div according to its content. It kinda work with static height - content just overflow. In case when I use min-height - my scrollbar disappear and I am on bottom of its content. I need that scrollbar xP

Let me show, with scrollbar:

height: calc( 100% - 40px ); height

Without scrollbar:

min-height: calc( 100% - 40px ); min-height

Scss file:

main#landing {
    section.portfolio {
        z-index: 2;
        min-height: calc( 100% - 40px );
        width: calc( 100% * (2/3) - 90px );
        background-color: $blue-3;
        position: absolute;
        bottom: 0;
        left: 0;
        color: $font-light;
        article.pf-object {
            max-width: 300px;
            float: left;
            figure {
                transition: background-color 0.5s ease-out;
                width: calc( 100% - 20px);
                background-color: $blue-2;
                text-align: center;
                padding: 10px 0;
                cursor: pointer;
                img {
                    width: calc( 100% - 20px );
                }
                &:hover {
                    background-color: $red-2;
                }
            }
        }
    }
}

I tried to put simple example in jsfiddle or sth, but it just work there :O I have no idea what is wrong.

Aucun commentaire:

Enregistrer un commentaire