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 7038925
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:44:06+00:00 2026-05-28T01:44:06+00:00

Because I want to toggle my text I need to hide a part of

  • 0

Because I want to toggle my text I need to hide a part of it.

Problem

  • My text height is going to be X or less pixels in height.
  • The height of the div depends on a sidebar height and is not as static as this demo.
  • If the letters on the last row are now truncated (se demo), I want to hide that row as well.

Look at my demo: http://jsfiddle.net/qWDLb/1/

My own thougt would be if the height could be calculated by using line-height or font sizes?

  • 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-28T01:44:07+00:00Added an answer on May 28, 2026 at 1:44 am

    You can determine line-height with:

    $('.text').css('line-height')
    

    This give you this height with ‘px’ at the end. Here is a working jsfiddle for showing 4 lines : http://jsfiddle.net/scaillerie/qWDLb/3/ .

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Because I want to avoid repetitive code, and I'm using a lot of text
I've got a toggle set on an element that I want to show hide
Because I want to do things like load images from the web (see this
I ask this because I want to display a page in iframe and on
I'm wondering because I want to store something other than pre-defined keywords that are
I don't want to use the HTTP::Proxy package because I want to dump out
The reason I want to sign the dll is because I want to add
I've decided to reopen this because I want to here more peoples views on
I'm working on a CMS basically because I want to learn how to build
I'm playing around with Castle WCF integration facility because I want to integrate my

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.