According to the attached image. I am trying to make a <ul> that contains several elements. However, I want the first five elements to always fill the height of the viewport, and if there are more than five elements, I need the rest to have the same height as the first five <li> .
According to number 4, the image can have a nested <ul> , which can fill a width that has several <li> .
The text inside the entire <li> should be vertically centered and multi-line, while maintaining the same height as other elements.
NOTE. Any other lis under the crease should have the same height as the initial first fifth. (Even if there are less than five elements in the beginning, they should not fill the full height. Only when there are five of them do they complete the full height of the page.
Any help is much appreciated! My previous question was not filled out, and I missed some clarifications: Elements of vertical extension. I use only the CSS solution (at the moment), which does not work as needed.
Thanks. 
Used code:
ul.navigation { list-style-type: none; margin: 0; padding: 0; display: table; width: 100%; height: 100%; } ul.navigation li { display: table-row; } ul.navigation li a { font-size:1.8em; display: table-cell; vertical-align: middle; padding: 1em 1.1em; text-transform: uppercase; color: white; text-decoration: none; }
source share