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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T16:26:39+00:00 2026-05-21T16:26:39+00:00

I hope I’m not repeating – it doesn’t seem like there are any questions

  • 0

I hope I’m not repeating – it doesn’t seem like there are any questions that have the same specifications as mine.

I’m looking for a way to “crop” a div with jQuery. The div is going to start with a width of zero, and then get animated to its full length. The tricky part is I want any text that overflows on the side to be hidden, rather than just pushed down to fill the space.

It doesn’t seem like the regular “overflow: hidden” will work because I could have many lines of text, and I want each line to be “cropped”, so the characters for the individual line are hidden instead of being bumped down to the next line. "cropped div"

I hope this is clear. Any suggestions?

  • 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-21T16:26:40+00:00Added an answer on May 21, 2026 at 4:26 pm

    You’ll need to use nested elements and CSS:

    <div id="content">
       <p>Paragraph 1</p>
       <p>Paragraph 2</p>
       <p>Paragraph 3</p>
    </div>
    

    In CSS you’ll want to set the p elements’s width to the full amount and set overflow to wrap. You’ll then want the div element to have overflow hidden and animate that element’s width.

    p { width: 300px; margin-top: 18px; }
    #content { overflow: hidden; width: 50px; }
    

    If you won’t want the extra div in your markup you can create the wrapper div in jQuery and put the paragraphs inside it when it comes time to animate.

    Fiddle: http://jsfiddle.net/XsLAT/

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

Sidebar

Related Questions

I hope this question does not come off as broad as it may seem
I hope this is a simple enough question for any SQL people out there...
Hope somebody has a good idea. I have strings like this: abcdefg abcde abc
I hope this question is not considered too basic for this forum, but we'll
I hope not everyone is using Rational Purify. So what do you do when
I hope there's a SharePoint expert here on SO who can help with this.
I hope this isn't considered a duplicate since it's more pointed than similar questions
Hope someone can help me here? Having an issue getting text that's located inside
Hope it's not against rules to post more than 1 question per page. I
Hope you can help me with this, (again in some cases!) I have a

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.