Basic: I have an unordered list with many listitems (containing a picture and title). Not knowing how long the title will be I don't know the hight of each listitem. To the left of this list is a big picture with title that "sets" the hight of my list (depending of the height en length of the title).
What I try to do: When the last listitem of my list can't be fully displayed, hide the whole listitem.
Examples: http://d.pr/eAlK & http://d.pr/8MVO
In the second example the 4th article is hidden because it wouldn't be fully visible.
Is this possible? I prefer I clean way that works crossbrowser if possible...
Using Starx Answer you can set the
neededHeight
to the height of your Image+title divBasically the idea is to calculate all the height of child elements together and compare with maximum allowed height.
Using jQuery
Found a noJS solution which works in any browser except IE (sigh! But degrades gracefully) Maybe there is a solution with this one: http://codeasily.com/jquery/multi-column-list-with-jquery
Uses
column-count
CSS.Any chance of having a column-count enabling script like html5.js (which doesn't work)?
Some awkward border-bug in Safari
http://jsfiddle.net/HerrSerker/f5Zjt/4/
HTML
CSS