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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T13:34:32+00:00 2026-05-11T13:34:32+00:00

I’ve got to develop an auto scaling arrivals and departures board at work. It’s

  • 0

I’ve got to develop an auto scaling arrivals and departures board at work.

It’s started out easily enough with me creating a table with percentage based column widths (and the overall table being 100% width).

For now, I’ve got a small piece of JQuery letting me change the scale of my text but its only to prove the concept.

I’m really after being able to automatically scale the font and table cell sizes according to the available screen width and height. I do know the maximum string length allowed for each column cell so I could, potentally, automatically set the em/px size based on some calculation.

However, I’m a bit stuck as where to start. I’m actively developing this now but my initial thoughts are:

scale = maxstringwidth_inpx / currentcellwidth_inpx

Where I’d calculate maxstringwidth by having a lookup table and the font metrics for a character 1em in size on the screen.

The cells are all assigned screen percentages so I should be able to read those directly.

Then I can set the font size, ie:

$('body').css('font-size', currentfontsize_px * scale); 

Does this sound a feasible approach? It also raises questions about the padding above and below each string in each cell but I’m sure I can do someting similar there too.

To qualify where I’m stuck:

  1. Are there examples of this kind of thing out in the wild (I couldn’t find any)
  2. Does my approach have pitfalls?
  3. Have you done it before and can share wisdom/techniques?
  4. Have I shot myself in the foot already and should consider a different approach?

I have mentioned using Flash to the PM as a means of autoscaling the text as we can then do a lot of the font metrics in ActionScript. However, I’m only just starting out with that using the .NET flash IDE so I’d be limited to that as a development platform.

Thanks for any tips, examples and advice!

Simon

  • 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. 2026-05-11T13:34:33+00:00Added an answer on May 11, 2026 at 1:34 pm

    CSS and HTML can be very finicky when it comes to this sort of thing especially since font-size can be very different on different computers. Case in point, if you are using the font, say, Verdana. It’s a pretty common font. Unfortunately the way Macs, Windows, and Linux renders it is slightly different. There’s really no way to guarantee the width/height of a ‘nice’ (non-monospaced) font, unless the application will be used in a very strictly controlled environment.

    I’m not normally a proponent of using Flash, but, if that’s an option, it’s really the only way to guarantee something will look as expected since you can embed fonts and, like you mentioned, there is a lot more control over typography in Flash than there is in CSS. You’re going to be doing some pretty heavy development in CSS and jQuery to achieve the same effects–and even then, you will still have difficulties between browsers and OSes.

    But, if you do decide to do this in CSS/jQuery/HTML, make sure you use ems everywhere–no pixels.

    Good luck, and let us know what you decide to do in the end.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I've got a string that has curly quotes in it. I'd like to replace
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
i got an object with contents of html markup in it, for example: string
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is

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.