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

  • Home
  • SEARCH
  • 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 7686893
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T19:34:52+00:00 2026-05-31T19:34:52+00:00

I have a time line feature in my site, on a certain year the

  • 0

I have a time line feature in my site, on a certain year the text maybe very long on some it may only be 1 line, i want to resize the page so that when a user clicks on the next year the page isnt really long with one line on it?

im using timeliner js from
http://www.csslab.cl/ejemplos/timelinr/latest/js/jquery.timelinr-0.9.5.js

 <ul id="dates">
<li><a href="#1940s">1940s</a></li>
<li><a href="#1950s">1950s</a></li>   
</ul>
<ul id="issues">
<li id="1940s"><img src="/timeline/1950.jpg" />
<h1>1940's</h1>
<p>RonaldertreRonaldertreRonaldertrevRonaldertre Ronaldertre RonaldertreRonaldertre Ronaldertre Ronaldertre Ronaldertre Ronaldertre Ronaldertre Ronaldertre Ronaldertre vkv RonaldertreRonaldertre kRonaldertre Ronaldertre Ronaldertre Ronaldertre Ronaldertrekv Ronaldertre RonaldertreRonaldertre Ronald &ldquo;Eddy&rdquo; Edmonson a qualified architect and surveyor joined the Royal Artillery in WW2. At the end of vre RonaldertreRonaldertre Ronald &ldquo;Eddy&rdquoWar he found himself stationed in Turin, and became interested in a nearby factory where the Germans held early experiments in plastic injection moulding. After being re RonaldertreRonaldertre Ronald &ldquo;Eddy&rdquo; Edmonson a qualified architect and surveyor joined the Royal Artillery in WW2. At the end of the War he found himself stationed in Turin, and became interested in a nearby factory where the Germans held early experiments in plastic injection moulding. After being re RonaldertreRonaldertre Ronald &ldquo;Eddy&rdquo; Edmonson a qualified architect and surveyor joined the Royal Artillery in WW2. At the end of the War he found himself stationed in Turin, and became interested in a nearby factory where the Germans held early experiments in plastic injection moulding. After being the War he found himself stationed in Turin, and became interested in a nearby factory where the Germans held early experiments in plastic injection moulding. After being Demobbed back at home, Eddy took this interest further and on 18th October 1946 set up plastic moulding company, Plastiers Limited (Lewisham). He is pictured (right) manning his first commercial production run! RonaldertreRonaldertreRonaldertreRonaldertreRonaldertrevRonaldertreRonaldertre test test test.</p>
</li>
<li id="1950s"><img src="/timeline/1960.jpg" />
<h1>1950's</h1>
<p>Eddy.</p>
</li>

</li>
</ul>

Example here :

http://jsfiddle.net/uzi002/sEFQS/1/

EDIT:

jquery ive attempted:

$("#dates li a").click(function () {
        $('#issues').css("height", $("#" + $(this).html()).height());
    });
  • 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-31T19:34:53+00:00Added an answer on May 31, 2026 at 7:34 pm

    Use CSS width & height

    If you want it to be dynamic use js to check the length and update the CSS width when text changes

    Edit:

    This example is for the width. Check your page elements for a good container that will give you the height you are looking for.

    for width you can do something like

    /* Give your paragraph an Id to be able to get them  <p id="paragraph"></p> */
    var text = document.getElementById("paragraph").innerHTML;
    //alert(text.length );
    $('#issues').width( text.length)
    //$('#issues').height( /* preferred height goes here */)
    

    then find a good measure to set the width, not necessarily the same as the string’s length.

    If you find a container that has the right height, just grab its height and update the other elements.

    if you want to figure the height based on the text, that means you will have to predict the number of lines broken on the page. That depends on the page layout/screen size and resolution. So, pick a number for a screen width (maybe 1024) then check on the layout how many lines it takes to break. You can go even more by checking all that dynamically and doing the calculations. IMO, it should not be a complex solution, but that depends on how critical it is to you.

    Sometimes, having height as 100% and putting it in place will make it take care of it self.

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

Sidebar

Related Questions

I have been using Eclipse for a long time, the feature that is less
I have this html line: <time itemprop=datePublished datetime=1923-12>December 1923</time> (USA) How can i retrieve
I have a file with DOS line endings that I receive at run-time, so
I have a script which, each time is called, gets the first line of
I have time in NSString like 15:15 I want to covert this NSString time
Say I have this line of code in the view. <?php echo CHtml::activeTextField($model,'start_time'); ?>
I have a very simple bit of jQuery to retrieve my latest Tweet $.getJSON(http://twitter.com/statuses/user_timeline/username.json?count=1,
Scenario I have a line of code whereby I pass a good number of
I have built several websites, and for some reason none of them will post
I've written a sharepoint application that needs to change web.config I have a feature

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.