Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7634289
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T07:07:54+00:00 2026-05-31T07:07:54+00:00

Basic: I have an unordered list with many listitems (containing a picture and title).

  • 0

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…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T07:07:55+00:00Added an answer on May 31, 2026 at 7:07 am

    Basically the idea is to calculate all the height of child elements together and compare with maximum allowed height.

    Using jQuery

    var neededHeight = $("#lhscontainer").outerHeight(); //you can also use static value 
    var totalChildHeight = 0;
    $("ul").children("li").each(function() {
        totalChildHeight+= $(this).outerHeight(); //add up to the total height 
        if(totalChildHeight> neededHeight) {  //compare if the height limit was exceeded
           $(this).hide(); // if it did, hide the current element
           $(this).nextAll().hide(); //hide all other list also
           return false; // break the loop to stop the further iteration
        }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a basic unordered list in HTML/CSS as follows... <div class=floatleft> <ul class=help>
I have a basic unordered list that isn't displaying in IE8 compatibility mode, but
I have made a basic unordered list. <ul> <li><a>abc</a></li> <li><a>def</a></li> <li><a>ghi</a></li> <li><a>jkl</a></li> </ul> I
I have a basic understanding of mock and fake objects, but I'm not sure
I have an unordered list of images that display inline and float next to
I have basic doubt regarding executable stored in ROM. As I know the executable
I have basic issue that i don't understand, we use HEAT to consume directory
I am trying something very basic: I have a list of 5 buttons. They
I have basic JavaScript code that needs to tell how many names out of
I am trying to create a basic navigation bar using an unordered list, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.