• 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: Iron, How Did They Make It? Part I, Mining

    This week we are starting a four-part look at pre-modern iron and steel production. As with our series on farming, we are going to follow the train of iron production from the mine to a finished object, be that a tool, a piece of armor, a simple nail, a w…

    via A Collection of Unmitigated Pedantry September 18, 2020

    Learning Game

    I came up with this game. In the game one person thinks of something and then gives the other person a clue. And the other person writes a guess down on a blackboard or a piece of paper. Or really anything you have that's laying around that's av…

    via Lily Wise's Blog Posts September 17, 2020

    Hong Kong Construction Costs

    I think we have found the #2 city in urban rail construction costs, behind only New York. This is Hong Kong, setting a world record for the most expensive urban el and encroaching on Singapore for most expensive non-New York subway. As we look for more da…

    via Pedestrian Observations September 16, 2020

    more     (via openring)


  • Posts
  • RSS
  • ◂◂RSS
  • Contact