HTML Expand To Fit

September 6th, 2012
html, tech
If I have a block of text that I want to expand to fill the screen, there ought to be some way to specify this in HTML. Specifically, I want to put contra dance calling cards on my phone [1]. I definitely don't want any scrolling, and I'd like them to be as big as possible. I've figured out a hackish way to do this with javascript, but there ought to be a clean way. The hackish way:
Draft: Trip To Lambertville
This runs a little loop:
  make font huge
  while vertical scroll bar present:
    make font a little smaller
While this works, I really ought to be able to ask the browser nicely "make this as big as will fit" instead of forcing it to do something so stupid [2]. Is this possible with just html and css?


[1] To replace the tiny illegible index cards in my wallet.

[2] Yes, I could use binary search. O(n) → O(log(n)). Still stupid.

Comment via: google plus, facebook

Recent posts on blogs I like:

Starting With Chords

A lot of people play fiddle. Basically nobody starts by learning chords before learning melodies. But that's actually how I learned. I started with chords. One of the nice things about learning to play violin this way is that you can go busking even…

via Anna Wise's Blog Posts November 15, 2024

Stuffies

I have some stuffies and I just have a bunny. Bunny is a rabbit. Woof is a seal. My favorite stuffie is bun bun. I play with my stuffies. Sometimes I jump up with them and I roll them. I can just throw them in the air when I want to play bthululubp wi…

via Nora Wise's Blog Posts November 15, 2024

You Can Buy A Malaria Net

2024 election takes

via Thing of Things November 6, 2024

more     (via openring)