• 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:

    Collections: Teaching Paradox, Europa Universalis IV, Part II: Red Queens

    This is the second part in a series (I) that examines the historical assumptions behind Paradox Interactive’s grand strategy computer game set in the early modern period, Europa Universalis IV (EU4). Last time, we took a look at how EU4 was a game fundame…

    via A Collection of Unmitigated Pedantry May 7, 2021

    Amtrak’s Continued Ignorance

    There was a congressional hearing about high-speed rail. Henry Miller in comments here took notes – thanks for this, much appreciated! The overall content was lacking; the politicians seemed like they were spinning their wheels, not because they themselve…

    via Pedestrian Observations May 7, 2021

    Books and websites on babies

    Several people I know are expecting a first baby soon, and I wrote up notes for one of them. Might as well share here too: Medical:Scott Alexander’s Biodeterminist’s Guide to Parenting is an interesting read, and some parts are actionable.  If you live in…

    via The whole sky April 14, 2021

    more     (via openring)


  • Posts
  • RSS
  • ◂◂RSS
  • Contact