• Posts
  • RSS
  • ◂◂RSS
  • Contact

  • HTML Expand To Fit

    September 6th, 2012
    html, tech  [html]
    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:

    EDT with updating double counts

    I recently got confused thinking about the following case: Calculator bet: I am offered the opportunity to bet on a mathematical statement X to which I initially assign 50% probability (perhaps X = 139926 is a quadratic residue modulo 314159). I have acce…

    via The sideways view October 12, 2021

    Meditations on newborns

    [Content: death.]I wrote most of this a couple of months ago when Nora was a newborn, but the first few months are not that conducive to finishing blog posts. New babies put you into a liminal period, both in your own experience and in how others treat yo…

    via The whole sky October 3, 2021

    The value of in-house expertise

    An alternate title for this post might be, "Twitter has a kernel team!?". At this point, I've heard that surprised exclamation enough that I've lost count of the number times that's been said to me (I'd guess that it's more tha…

    via Posts on Dan Luu September 29, 2021

    more     (via openring)


  • Posts
  • RSS
  • ◂◂RSS
  • Contact