Quantcast
Channel: Active questions tagged flexbox - Stack Overflow
Viewing all articles
Browse latest Browse all 1318

Flexbox sets height of inside element to 0

$
0
0

I have a problem with flexbox. When I set height of a paragraph and also set its overflow to hidden, that paragraph disappear in flexbox div.

Here is fiddle:https://jsfiddle.net/Slit/0yy3q8bL/

The code:

<div class="N"><p>Lorem ipsum</p><p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p><img src="http://codegentstatic-codegentltd.netdna-ssl.com/media/original/0d9648a6-afc6-1/845x2000.jpg"></div><style>.N {    overflow: scroll;    position: relative;    display: flex;    flex-direction: column;    flex-wrap: nowrap;    align-items: center;    min-width: 100vmin;    width: 100vmin;    height: 65vmin;    border: 1px solid green;    list-style: none;}.N img {    display: list-item;    width: 98%;    height: 98%;    order: 1;}.N p:nth-child(1) {    display: list-item;    font-size: 4vmin;    order: 2;    background-color: white;}.N p:nth-child(2) {    overflow: hidden;    height: 20%;    display: list-item;    text-align: justify;    font-size: 4vmax;    background-color: white;    order: 3;}</style>

Viewing all articles
Browse latest Browse all 1318

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>