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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T23:28:13+00:00 2026-06-08T23:28:13+00:00

I create dynamic HTML pages with 3 columns. Each column can contain a variable

  • 0

I create dynamic HTML pages with 3 columns. Each column can contain a variable amount of text – from 0 to 1000 words. I want the text in the 3 columns look approximately the same height. So, I want to have the column widths change automatically according to the amount of text they contain.

In HTML, this happens automatically in a table, when each cell has a single div of text, see the first table here:
http://tora.us.fm/_script/demotables.html

However, when the cells contain several divs, this doesn’t work anymore, see the second table there. The leftmost column is very narrow and tall, instead of being wider and shorter.

Adding a “width” attribute to the leftmost column (by clicking the button) shows the expected result. However, I do not know in advance what column should be what width.

Is it possible to have it adjusted automatically?

A jsfiddle: http://jsfiddle.net/erelsgl/RJa2k/5/

  • 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-06-08T23:28:14+00:00Added an answer on June 8, 2026 at 11:28 pm

    With the help of my friend, Eden Erez, I found a hack that partly solves the problem:

    • In each TD, print the content a second time – inside a special div, like this:

      < td >
       < div class='autowidth' >
           $content
       < /div >
       $content
      < /td >
      
    • In the stylesheet, insert this:

      .autowidth {visibility:hidden;}
      .autowidth * {display:inline;}
      

    In some of the cases, this will make the browser set the column widths as though they are single-paragraph, but still display them as multi-paragraph. See an example here:
    http://jsfiddle.net/erelsgl/RJa2k/76/

    This works surprisingly good in most cases.

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

Sidebar

Related Questions

I am trying to create some dynamic html out of some data from db.
I am trying to create a dynamic bar in HTML using javascript. I have
I am writing a custom tag to create dynamic css and other html formating
I am trying to create dynamic pages without creating new files and getting the
If you use dynamic pages like JSP or asp.net, you can have your page
I want to create image object when user selecting a file from html page.
Is it possible to create dynamic HTML page with Javascript ? Now or tomorrow...
i'm using powerplot to create a dynamic graph in iphone. while going through http://www.field-theory.org/articles/powerplot/example.html
i create dynamic textviews in an activity with some fields returned by a webservice.
I create dynamic LinkButton and I add LinkButton's Click Trigger to UpdatePanel. Now, When

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.